pmbootstrap config -h: show keys / tab complete (!1729)
Show all config keys that can be queried and set in the 'pmbootstrap config -h' output and make tab completion work for the key names. I've set "metavar" and placed the variables in the helpstring. That way, argparse will not generate a huge "positional arguments" string that blows up the layout of the help output: [{ccache_size,device,extra_packages,hostname,jobs,kernel,keymap,...
This commit is contained in:
parent
c4b4aa7252
commit
60f12ae2df
|
@ -494,7 +494,9 @@ def arguments():
|
||||||
# Action: config
|
# Action: config
|
||||||
config = sub.add_parser("config",
|
config = sub.add_parser("config",
|
||||||
help="get and set pmbootstrap options")
|
help="get and set pmbootstrap options")
|
||||||
config.add_argument("name", nargs="?", help="variable name")
|
config.add_argument("name", nargs="?", help="variable name, one of: " +
|
||||||
|
", ".join(sorted(pmb.config.config_keys)),
|
||||||
|
choices=pmb.config.config_keys, metavar="name")
|
||||||
config.add_argument("value", nargs="?", help="set variable to value")
|
config.add_argument("value", nargs="?", help="set variable to value")
|
||||||
|
|
||||||
# Action: bootimg_analyze
|
# Action: bootimg_analyze
|
||||||
|
|
Loading…
Reference in New Issue