Added --progress
argument to command system.
This commit is contained in:
parent
6c517a9126
commit
9262b598ac
1 changed files with 3 additions and 0 deletions
|
@ -105,6 +105,7 @@ Options:
|
||||||
Config path (may be specified more than once)
|
Config path (may be specified more than once)
|
||||||
-n, --no-init Don't load config before executing command
|
-n, --no-init Don't load config before executing command
|
||||||
-d, --debug Increase logging level to DEBUG
|
-d, --debug Increase logging level to DEBUG
|
||||||
|
-P, --progress Show progress indicators (where relevant)
|
||||||
-v, --verbose Increase logging level to INFO
|
-v, --verbose Increase logging level to INFO
|
||||||
-V, --version Display program version and exit
|
-V, --version Display program version and exit
|
||||||
|
|
||||||
|
@ -132,6 +133,7 @@ Try '%(name)s help <command>' for more help.""" % self
|
||||||
metavar='PATH')
|
metavar='PATH')
|
||||||
parser.add_argument('-d', '--debug', action='store_true', dest='debug')
|
parser.add_argument('-d', '--debug', action='store_true', dest='debug')
|
||||||
parser.add_argument('-n', '--no-init', action='store_true', default=False)
|
parser.add_argument('-n', '--no-init', action='store_true', default=False)
|
||||||
|
parser.add_argument('-P', '--progress', action='store_true', default=False)
|
||||||
parser.add_argument('-v', '--verbose', action='store_true', dest='verbose')
|
parser.add_argument('-v', '--verbose', action='store_true', dest='verbose')
|
||||||
parser.add_argument('-V', '--version', action='version',
|
parser.add_argument('-V', '--version', action='version',
|
||||||
version="%%(prog)s %s" % self.version)
|
version="%%(prog)s %s" % self.version)
|
||||||
|
@ -182,6 +184,7 @@ Try '%(name)s help <command>' for more help.""" % self
|
||||||
|
|
||||||
# And finally, do something of real value...
|
# And finally, do something of real value...
|
||||||
cmd = self.subcommands[cmd](parent=self)
|
cmd = self.subcommands[cmd](parent=self)
|
||||||
|
cmd.show_progress = args.progress
|
||||||
cmd._run(*(args.command + args.argv))
|
cmd._run(*(args.command + args.argv))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue