On Thu, Jul 13, 2017 at 6:31 PM, jungle Boogie <jungleboog...@gmail.com> wrote: > On 6 June 2017 at 06:50, Johan Kuuse <jo...@kuu.se> wrote: >> Hi, >> >> The following commands, executed without any arguments, are mute: >> >> f add >> f rm >> f delete >> f forget >> >> IMHO, they should show a help message instead. >> > > Is it desired to not do anything with the command isn't followed by a > filename/argument? >
I cannot I think of any situation where it should be desired not showing the help message. It's just a matter about being coherent, either you show a help message, or you don't. An example: The file src/add.c contains both the commands 'add' and 'mv' (among others). fossil add (no output) fossil mv Usage: fossil mv OLDNAME NEWNAME Just discovered that the following commands behave the same (no help message): f cat f sha1 f sha3 The two last commands may read from stdin, but even so, they require at least 1 argument, '-'. Index: src/add.c ================================================================== --- src/add.c +++ src/add.c @@ -298,10 +298,13 @@ if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL; /* We should be done with options.. */ verify_all_options(); + if( g.argc<3 ){ + usage("FILE..."); + } db_must_be_within_tree(); if( zCleanFlag==0 ){ zCleanFlag = db_get("clean-glob", 0); } if( zIgnoreFlag==0 ){ BR, Johan >> Best Regards, >> Johan > _______________________________________________ > fossil-users mailing list > fossil-users@lists.fossil-scm.org > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Index: src/add.c ================================================================== --- src/add.c +++ src/add.c @@ -298,10 +298,13 @@ if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL; /* We should be done with options.. */ verify_all_options(); + if( g.argc<3 ){ + usage("FILE..."); + } db_must_be_within_tree(); if( zCleanFlag==0 ){ zCleanFlag = db_get("clean-glob", 0); } if( zIgnoreFlag==0 ){
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users