New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nix/*: Add -h
-shortcut for --help
to display helptext
#3760
Conversation
I'm used to pass `-h` to a command to read a helptext and always having to type `--help` is slightly annoying.
I don't think |
OTOH a lot of other devtools (e.g.
Ah right, missed that one. But |
ping @edolstra any updates on this? |
There are other tools such as GNU coreutils and git that only accept |
yeah but it's becoming more and more common which is why I personally think that this is an actual (though small) improvement. However, if I'm in a minority here, I'll close this :) |
GNU recommends to use the long version while the short version is used in UNIX.
https://softwareengineering.stackexchange.com/a/307472/193427 I provide both when possible. At least often used parameters should have a short version. |
I very frequently use |
Closing for now. While I like |
It's true that There is however something that could be improved without adding additional flags: $ git mv
usage: git mv [<options>] <source>... <destination>
-v, --verbose be verbose
-n, --dry-run dry run
-f, --force force move/rename even if target exists
-k skip move/rename errors
$ git mv --garbage-flag
error: unknown option `garbage-flag'
usage: git mv [<options>] <source>... <destination>
-v, --verbose be verbose
-n, --dry-run dry run
-f, --force force move/rename even if target exists
-k skip move/rename errors
$ nix why-depends
error: more arguments are required
Try 'nix --help' for more information.
$ nix why-depends --garbage-flag
error: unrecognised flag '--garbage-flag'
Try 'nix --help' for more information.
So showing the usage on an incorrect invocation could get rid of the need for |
I'm used to pass
-h
to a command to read a helptext and always havingto type
--help
is slightly annoying.