You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.
I am writing a CLI and am considering hierarchical command structure, such that a top level help would look like…
cli-tool
usage:
cli-tool <command>
cli-tool --list
options:
--list List available commands
…and a help for a given command foo would look like
cli-tool foo
usage:
cli-tool foo --list
options:
--list List available commands under 'foo'
Say cli-tool --list would yield:
foo/bar
foo/baz
and the help for the foo/bar sub-command looks like:
cli-tool foo/bar
usage:
cli-tool foo/bar
For the last example I get an error:
Failed to parse specification:
Unexpected input: /bar
Turns out that the parser is only able to accept a very narrow range of ASCII alphanumerical characters plus a dot ., the hyphen - and the underscore _.
Note that in docopt forward slashes / are OK in usage examples.
The text was updated successfully, but these errors were encountered:
I have never seen / used a command line utility that uses a "/", so I did not catch it. I don't mind adding this in, but I expect there will be many more such cases. I agree losening this up is a good idea, going from inclusive to an exclusive set of allowed characters.
I am writing a CLI and am considering hierarchical command structure, such that a top level help would look like…
…and a help for a given command
foo
would look likeSay
cli-tool --list
would yield:and the help for the
foo/bar
sub-command looks like:For the last example I get an error:
Turns out that the parser is only able to accept a very narrow range of ASCII alphanumerical characters plus a dot ., the hyphen - and the underscore _.
Note that in docopt forward slashes / are OK in usage examples.
The text was updated successfully, but these errors were encountered: