luciopaiva / itermoxyl

Tool to automatically open multiple ssh connections in iTerm2 by querying ~/.ssh/config.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with subdirectories

richardklose opened this issue · comments

I have my ssh config files organized like this:

.ssh
|-- config
|-- config.d
    |-- customerA
    |   |--platformA1
    |   |--platformA2
    |
    |--customerB
        |--platformB1
        |--platformB2

The platform*-files hold the actual host entries.

It seems that itermoxyl can't deal with a structure of subdirectories in subdirectories:

Traceback (most recent call last):
  File "/Users/richard/.local/bin/itermoxyl", line 267, in <module>
    main()
  File "/Users/richard/.local/bin/itermoxyl", line 247, in main
    available_hosts = load_hosts()
  File "/Users/richard/.local/bin/itermoxyl", line 71, in load_hosts
    load_hosts(f, available_hosts)
  File "/Users/richard/.local/bin/itermoxyl", line 52, in load_hosts
    with open(normpath(join(CONFIG_PATH, expanduser(config_file_name)))) as f:
IOError: [Errno 21] Is a directory: '/Users/richard/.ssh/config.d/customerA'