-
-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
There is an established convention for CLI parameters. Here are a few links you can read through to get a basic idea:
- https://unix.stackexchange.com/questions/21852/single-dashes-for-single-character-options-but-double-dashes-for-words
- https://serverfault.com/questions/387935/whats-the-difference-betwen-the-single-dash-and-double-dash-flags-on-shell-comm
- https://superuser.com/questions/372203/whats-the-difference-between-one-dash-and-two-dashes-for-command-prompt-paramet
Parameters that are a single character should use a single hyphen -
so that they can be used together if they don't require values.(e.g. command -abc
)
Parameters that are multiple characters should use a double hyphen --
. (e.g. CoreLocationCLI --json
)
There are also established conventions for parameters like --help
, which would be useful for anyone who discovers the program and wants to learn more.
So, you could alias the current mulit-character commands like this:
-h, --help
-v, --verbose
etc.
Here are some suggestions:
-h, --help
-f, --format
-j, --json
-v, --verbose
-V, --version (print version information)
-w, --watch (currently -follow)
f
is already used by format, so I suggested -w, --watch
. Another idea is -c, --continuous
.
Metadata
Metadata
Assignees
Labels
No labels