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
Sometimes I find myself wishing that there was a more concise way to express Sopel CLI actions, e.g. sopel-plugins e pluginname.
Problems Solved
It just saves typing. I thought of this idea (again) while messing with my bot over ssh from a smartphone.
Alternatives
I thought of having subcommands support stemming—any unambiguous sequence that doesn't overlap with another subcommand—but as far as I can tell argparse doesn't support it. (There is allow_abbrev for long option names, but it doesn't apply to subparsers/subcommands.)
Notes
There is an aliases kwarg to add_parser() in argparse, which would let us define shorter aliases for subcommands.
I haven't looked at top-level command aliases yet, but maybe those would be better left to users' shell config (we could provide a sample bashrc etc. snippet).
The text was updated successfully, but these errors were encountered:
Requested Feature
Sometimes I find myself wishing that there was a more concise way to express Sopel CLI actions, e.g.
sopel-plugins e pluginname
.Problems Solved
It just saves typing. I thought of this idea (again) while messing with my bot over ssh from a smartphone.
Alternatives
I thought of having subcommands support stemming—any unambiguous sequence that doesn't overlap with another subcommand—but as far as I can tell
argparse
doesn't support it. (There isallow_abbrev
for long option names, but it doesn't apply to subparsers/subcommands.)Notes
There is an
aliases
kwarg toadd_parser()
inargparse
, which would let us define shorter aliases for subcommands.I haven't looked at top-level command aliases yet, but maybe those would be better left to users' shell config (we could provide a sample bashrc etc. snippet).
The text was updated successfully, but these errors were encountered: