Skip to content

Commit

Permalink
Added 'assh info'
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Mar 21, 2015
1 parent af69edb commit 0f83c9d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions advanced_ssh_config/bin.py
Expand Up @@ -144,6 +144,18 @@ def advanced_ssh_config():
routing = ssh.get_routing()
ssh.connect(routing)

elif options.command == 'info':
routing = ssh.get_routing()
for key, value in routing.items():
if value is None:
continue
if isinstance(value, list):
if len(value):
print('{}:'.format(key))
print('\n'.join(['- {}'.format(line) for line in value]))
else:
print('{}: {}'.format(key, value))

elif options.command == 'generate-etc-hosts':
assh_to_etchosts()

Expand Down

0 comments on commit 0f83c9d

Please sign in to comment.