Fossil SCM

Improved help for the "test-which" command, explaining why it is retained even though we now have a "which" command without the "test-" prefix.

drh 2025-03-16 22:49 trunk
Commit b3f270ffd657c222ecfa8a8304ad5f096ba3cfae6fd373f680b2f0673853803e
1 file changed +7
+7
--- src/file.c
+++ src/file.c
@@ -1572,10 +1572,17 @@
15721572
**
15731573
** Usage: %fossil test-which ARGS...
15741574
**
15751575
** For each argument, search the PATH for the executable with the name
15761576
** and print its full pathname.
1577
+**
1578
+** See also the "which" command (without the "test-" prefix). The plain
1579
+** "which" command is more convenient to use since it provides the -a/-all
1580
+** option, and because it is shorter. The "fossil which" command without
1581
+** the "test-" prefix is recommended for day-to-day use. This command is
1582
+** retained because it tests the internal file_fullexename() function
1583
+** whereas plain "which" does not.
15771584
*/
15781585
void test_which_cmd(void){
15791586
int i;
15801587
for(i=2; i<g.argc; i++){
15811588
char *z = file_fullexename(g.argv[i]);
15821589
--- src/file.c
+++ src/file.c
@@ -1572,10 +1572,17 @@
1572 **
1573 ** Usage: %fossil test-which ARGS...
1574 **
1575 ** For each argument, search the PATH for the executable with the name
1576 ** and print its full pathname.
 
 
 
 
 
 
 
1577 */
1578 void test_which_cmd(void){
1579 int i;
1580 for(i=2; i<g.argc; i++){
1581 char *z = file_fullexename(g.argv[i]);
1582
--- src/file.c
+++ src/file.c
@@ -1572,10 +1572,17 @@
1572 **
1573 ** Usage: %fossil test-which ARGS...
1574 **
1575 ** For each argument, search the PATH for the executable with the name
1576 ** and print its full pathname.
1577 **
1578 ** See also the "which" command (without the "test-" prefix). The plain
1579 ** "which" command is more convenient to use since it provides the -a/-all
1580 ** option, and because it is shorter. The "fossil which" command without
1581 ** the "test-" prefix is recommended for day-to-day use. This command is
1582 ** retained because it tests the internal file_fullexename() function
1583 ** whereas plain "which" does not.
1584 */
1585 void test_which_cmd(void){
1586 int i;
1587 for(i=2; i<g.argc; i++){
1588 char *z = file_fullexename(g.argv[i]);
1589

Keyboard Shortcuts

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