cli doesnt follow unix conventions #9

Closed
opened 2 months ago by inktrap · 3 comments
inktrap commented 2 months ago

Just noticed that the options/params don't follow the unix conventions, e.g. -port and not -p --port. Here it says that this is a property of the flag package. What do you think? Would you consider changing this?

Just noticed that the options/params don't follow the unix conventions, e.g. ``-port`` and not ``-p --port``. [Here](https://medium.com/what-i-talk-about-when-i-talk-about-technology/dealing-with-command-line-options-in-golang-flag-package-e5fb6ef1a79e) it says that this is a property of the flag package. What do you think? Would you consider changing this?
Owner

While I see the appeal of a shorthand version of each parameter, like -p for --port, as far as I know the flag package does not allow that. This change would therefore require switching to a different library or working around the shortcomings of flag in an ugly way. Both of which I don't see as necessary, as I don't think that having shorthands with single dashes is that big of a dealbreaker.

While I see the appeal of a shorthand version of each parameter, like `-p` for `--port`, as far as I know the flag package does not allow that. This change would therefore require switching to a different library or working around the shortcomings of flag in an ugly way. Both of which I don't see as necessary, as I don't think that having shorthands with single dashes is that big of a dealbreaker.
snaums closed this issue 2 months ago
Poster

I guess you can use --help and -help which I found to be confusing, because only -help style options are listed when calling --help. So one could clarify somewhere that double-minus style options are also possible? I don't know how flexible the flag package is because I haven't done anything with go so far. And yes, I wouldn't hack around it as well :)

I guess you can use ``--help`` and ``-help`` which I found to be confusing, because only ``-help`` style options are listed when calling ``--help``. So one could clarify somewhere that double-minus style options are also possible? I don't know how flexible the flag package is because I haven't done anything with go so far. And yes, I wouldn't hack around it as well :)
Poster

I'll guess you'll see this and I won't reopen it

I'll guess you'll see this and I won't reopen it
Sign in to join this conversation.
Loading…
There is no content yet.