mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-09 22:37:47 +08:00
print full usage string in interactive mode
This commit is contained in:
@@ -546,12 +546,13 @@ def run_cli(argv=None, config_path=CONFIG_PATH):
|
||||
if interactive:
|
||||
arg_names = [mi['name'] for mi in method_info['args']]
|
||||
opt_names = [mi['name'] for mi in method_info['opts']]
|
||||
usage_string =
|
||||
arg_usage = ' '.join(arg_names)
|
||||
opt_usage = ' '.join( ['[{}]'.format(opt) for opt in opt_names] )
|
||||
|
||||
print('')
|
||||
print('Interactive prompt engaged. Press Ctrl+C to quit')
|
||||
print('Help for "{}": {}'.format(method_info['command'], method_info['help']))
|
||||
print('Arguments: {} {}'.format(method_info['command'],
|
||||
print('Arguments: {} {}'.format(method_info['command'], arg_usage, opt_usage))
|
||||
print('')
|
||||
|
||||
required_args = prompt_args(method_info['args'], prompt_func)
|
||||
|
||||
Reference in New Issue
Block a user