Order subcommands alphabetically.

This commit is contained in:
Darko Poljak 2016-10-27 18:34:24 +02:00
parent 42adef0a76
commit 75e85379f6

View file

@ -159,6 +159,11 @@ def commandline():
default=os.environ.get('CDIST_REMOTE_EXEC')) default=os.environ.get('CDIST_REMOTE_EXEC'))
parser['config'].set_defaults(func=cdist.config.Config.commandline) parser['config'].set_defaults(func=cdist.config.Config.commandline)
# Install
parser['install'] = parser['sub'].add_parser('install', add_help=False,
parents=[parser['config']])
parser['install'].set_defaults(func=cdist.install.Install.commandline)
# Shell # Shell
parser['shell'] = parser['sub'].add_parser( parser['shell'] = parser['sub'].add_parser(
'shell', parents=[parser['loglevel']]) 'shell', parents=[parser['loglevel']])
@ -168,11 +173,6 @@ def commandline():
' should be POSIX compatible shell.')) ' should be POSIX compatible shell.'))
parser['shell'].set_defaults(func=cdist.shell.Shell.commandline) parser['shell'].set_defaults(func=cdist.shell.Shell.commandline)
# Install
parser['install'] = parser['sub'].add_parser('install', add_help=False,
parents=[parser['config']])
parser['install'].set_defaults(func=cdist.install.Install.commandline)
for p in parser: for p in parser:
parser[p].epilog = ( parser[p].epilog = (
"Get cdist at http://www.nico.schottelius.org/software/cdist/") "Get cdist at http://www.nico.schottelius.org/software/cdist/")