allow use of ./x.py help <cmd> ...

This commit is contained in:
Collins Abitekaniza 2018-10-01 04:06:58 +03:00
parent 3bc2ca7e4f
commit f9375674df
1 changed files with 5 additions and 0 deletions

View File

@ -844,6 +844,11 @@ def bootstrap(help_triggered):
def main():
"""Entry point for the bootstrap process"""
start_time = time()
# x.py help <cmd> ...
if len(sys.argv) > 1 and sys.argv[1] == 'help':
sys.argv = sys.argv[:1] + [sys.argv[2], '-h'] + sys.argv[3:]
help_triggered = (
'-h' in sys.argv) or ('--help' in sys.argv) or (len(sys.argv) == 1)
try: