Register enterprise commands right after login
@@ -176,12 +176,6 @@ def loop(params):
api.sync_down(params)
while True:
- if len(params.commands) > 0:
- params.command = params.commands[0]
- params.commands = params.commands[1:]
-
- if not params.command:
- try:
if params.prepare_commands:
if params.enterprise:
register_enterprise_commands(commands, aliases, command_info)
@@ -189,6 +183,12 @@ def loop(params):
unregister_enterprise_commands(commands, aliases, command_info)
params.prepare_commands = False
+ if len(params.commands) > 0:
+ params.command = params.commands[0].strip()
+ params.commands = params.commands[1:]
+
+ if not params.command:
+ try:
if prompt_session is not None:
params.command = prompt_session.prompt(get_prompt(params)+ '> ')
else:
