1
1
Fork
You've already forked nfp
0

Missing -h/--help option #1

Closed
opened 2026年05月07日 10:31:43 +02:00 by kas · 2 comments

As a minimum, nfp ought to recognize a -h/--help option that would make the user aware of the -e option. E.g.:

$ nfp -h
Usage: nfp [OPTIONS]
Run user-defined actions on new files in watched directories.
options:
 -h, --help show this help message and exit
 -e, --edit edit configuration file
 -V, --version show version information and exit
nfp will use $VISUAL/$EDITOR to edit the configuration file.

Users literally have hundreds, if not thousands, of commands available (my /usr/bin currently holds 7_136 commands), and it is unrealistic to expect that the user will remember that nfp has an option named -e that will invoke an editor on the configuration file — especially because nfp will probably rarely be called once the user has told it which directories to watch.


As you can see, I have also suggested a -V/--version option. This will be handy for users, packagers, and bug-reporters alike. Once nfp has been installed, there is literally no way of knowing which version is currently installed.

For --version I have suggested the short form -V with a capital V. It is not an option that will be used frequestly, and by using a capital V keeps the shorthand -v open for a potential --verbose, or similar.

As a minimum, `nfp` ought to recognize a `-h`/`--help` option that would make the user aware of the `-e` option. E.g.: ```sh $ nfp -h Usage: nfp [OPTIONS] Run user-defined actions on new files in watched directories. options: -h, --help show this help message and exit -e, --edit edit configuration file -V, --version show version information and exit nfp will use $VISUAL/$EDITOR to edit the configuration file. ``` Users literally have hundreds, if not thousands, of commands available (my `/usr/bin` currently holds 7_136 commands), and it is unrealistic to expect that the user will remember that `nfp` has an option named `-e` that will invoke an editor on the configuration file — especially because `nfp` will probably rarely be called once the user has told it which directories to watch. ---- As you can see, I have also suggested a `-V`/`--version` option. This will be handy for users, packagers, and bug-reporters alike. Once `nfp` has been installed, there is literally no way of knowing which version is currently installed. For `--version` I have suggested the short form `-V` with a capital V. It is not an option that will be used frequestly, and by using a capital V keeps the shorthand `-v` open for a potential `--verbose`, or similar.

Yes, that seems like an obvious thing to do. And patches are welcome.

Yes, that seems like an obvious thing to do. And patches are welcome.
Author
Copy link

I don't speak Rust, sorry.

I don't speak Rust, sorry.
Sign in to join this conversation.
No Branch/Tag specified
main
No results found.
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
isagalaev/nfp#1
Reference in a new issue
isagalaev/nfp
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?