sys.argv won't work if there are any options in the be call, e.g.
be -d DIR diff
raise cmdutil.UsageError, "must supply a command"
sys.exit(cmdutil.execute(args[0], args[1:]))
except cmdutil.GetHelp:
- print cmdutil.help(sys.argv[1])
+ print cmdutil.help(args[0])
sys.exit(0)
except cmdutil.GetCompletions, e:
print '\n'.join(e.completions)
print cmdutil.help(parser=parser)
else:
print "\nArgs:", args
- print cmdutil.help(sys.argv[1])
+ print cmdutil.help(args[0])
sys.exit(1)
except cmdutil.UserError, e:
print "ERROR:"