Closed jsejcksn closed 2 years ago
There is an established convention for CLI parameters. Here are a few links you can read through to get a basic idea:
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)
-
command -abc
Parameters that are multiple characters should use a double hyphen --. (e.g. CoreLocationCLI --json)
--
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.
--help
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.
f
-w, --watch
-c, --continuous
Looks great. That suggested set is good. Perhaps leave off -V.
-V
Here is a library that may be able to do this https://github.com/apple/swift-argument-parser
Thank you, fixed and released
There is an established convention for CLI parameters. Here are a few links you can read through to get a basic idea:
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:
etc.
Here are some suggestions:
f
is already used by format, so I suggested-w, --watch
. Another idea is-c, --continuous
.