Fossil SCM

Add the test-echo command - useful for investigation the wildcard expansion behavior of shells.

drh 2011-04-07 22:41 trunk
Commit cbf8782d562fb44058f5282fbd15b419e407ed89
1 file changed +13
+13
--- src/main.c
+++ src/main.c
@@ -1444,5 +1444,18 @@
14441444
}
14451445
db_close(1);
14461446
win32_http_server(iPort, mxPort, zBrowserCmd, zStopperFile, zNotFound, flags);
14471447
#endif
14481448
}
1449
+
1450
+/*
1451
+** COMMAND: test-echo
1452
+**
1453
+** Echo all command-line arguments (enclosed in [...]) to the screen so that
1454
+** wildcard expansion behavior of the host shell can be investigated.
1455
+*/
1456
+void test_echo_cmd(void){
1457
+ int i;
1458
+ for(i=0; i<g.argc; i++){
1459
+ printf("argv[%d] = [%s]\n", i, g.argv[i]);
1460
+ }
1461
+}
14491462
--- src/main.c
+++ src/main.c
@@ -1444,5 +1444,18 @@
1444 }
1445 db_close(1);
1446 win32_http_server(iPort, mxPort, zBrowserCmd, zStopperFile, zNotFound, flags);
1447 #endif
1448 }
 
 
 
 
 
 
 
 
 
 
 
 
 
1449
--- src/main.c
+++ src/main.c
@@ -1444,5 +1444,18 @@
1444 }
1445 db_close(1);
1446 win32_http_server(iPort, mxPort, zBrowserCmd, zStopperFile, zNotFound, flags);
1447 #endif
1448 }
1449
1450 /*
1451 ** COMMAND: test-echo
1452 **
1453 ** Echo all command-line arguments (enclosed in [...]) to the screen so that
1454 ** wildcard expansion behavior of the host shell can be investigated.
1455 */
1456 void test_echo_cmd(void){
1457 int i;
1458 for(i=0; i<g.argc; i++){
1459 printf("argv[%d] = [%s]\n", i, g.argv[i]);
1460 }
1461 }
1462

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button