Skip to content

Commit ca7a0c6

Browse files
committed
tokenize the shell config
1 parent 59f3add commit ca7a0c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

netfoundry/ctl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,14 @@ def login(cli):
175175
cli.echo(json_dumps(summary_object, indent=4))
176176
else: # if eval
177177
token_env = f"""
178-
# $ source <(nfctl --credentials=credentials.json login --eval)
178+
# $ eval "$({cli.prog_name} --credentials=credentials.json login --eval)"
179179
export NETFOUNDRY_API_TOKEN="{organization.token}"
180180
export NETFOUNDRY_API_ACCOUNT="{organization.credentials if hasattr(organization, 'credentials') else ''}"
181181
export NETFOUNDRY_ORGANIZATION="{organization.id}"
182182
{'export NETFOUNDRY_NETWORK="'+network.id+'"' if network else ''}
183183
{'export NETFOUNDRY_NETWORK_GROUP="'+network_group.id+'"' if network_group else ''}
184184
{'export MOPENV="'+organization.environment+'"' if organization.environment else ''}
185+
eval "$(register-python-argcomplete {cli.prog_name})"
185186
"""
186187
if cli.config.general.color:
187188
highlighted = highlight(token_env, bash_lexer, Terminal256Formatter(style=cli.config.general.style))

0 commit comments

Comments
 (0)