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
This is a potential feature but probably warrants a little research before implementing it. I'm thinking it could be more intuitive to search up the subcommand tree (I'm currently adding support for multi-level subcommands) for options that aren't matched by the current subcommand. For example, if we have these commands:
dylan [--verbose --debug] new workspace [other options]
dylan [--verbose --debug] new library [other options]
then currently one has to invoke like this: dylan --verbose new workspace --blah my-project
The idea is to allow this as well: dylan new workspace --verbose --blah my-project
My thinking is that this puts less burden on the end-user to remember which part of the command defines the --verbose flag. I should note that this idea originally came from the "fallthrough" option here, where they went literallyinsane with options.
If there were any conflict (e.g., the new or the workspace subcommand accepted its own --verbose flag) then obviously the nearer one would take precedence, but (a) that should be very rare and (b) don't design your command line that way.
I did check Python argparse and they do not appear to support this feature. They parse the way we currently do.
The text was updated successfully, but these errors were encountered:
This is a potential feature but probably warrants a little research before implementing it. I'm thinking it could be more intuitive to search up the subcommand tree (I'm currently adding support for multi-level subcommands) for options that aren't matched by the current subcommand. For example, if we have these commands:
then currently one has to invoke like this:
dylan --verbose new workspace --blah my-project
The idea is to allow this as well:
dylan new workspace --verbose --blah my-project
My thinking is that this puts less burden on the end-user to remember which part of the command defines the
--verbose
flag. I should note that this idea originally came from the "fallthrough" option here, where they went literally insane with options.If there were any conflict (e.g., the
new
or theworkspace
subcommand accepted its own--verbose
flag) then obviously the nearer one would take precedence, but (a) that should be very rare and (b) don't design your command line that way.I did check Python
argparse
and they do not appear to support this feature. They parse the way we currently do.The text was updated successfully, but these errors were encountered: