Jump to content

Recommended Posts

user.workflow.3ACC632C-5489-45C1-92AA-6FC07DC4B472 yossarian$ python -c 'import alfredssh; print alfredssh.complete("local");'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "alfredssh.py", line 137, in complete
    fetch_known_hosts('~/.ssh/known_hosts'),
  File "alfredssh.py", line 83, in fetch_known_hosts
    results.update(line.split()[0].split(','))
IndexError: list index out of range

^^ First command - fwiw, my python version when running that command is 2.7.8. The /usr/bin version is 2.7.5 and gives me the same output.

 

OK. It looks like your ~/.ssh/known_hosts contains a line that the workflow couldn't handle: most likely a blank line (with which I reproduced the error). I've updated it to handle blanks at GitHub and Packal: download

Thanks for reporting the issue!

Bonus fix: it also now ignores encrypted entries in ~/.ssh/known_hosts.

Edited by isometry

Share this post


Link to post

iTerm2 and zsh user, worked out of the box. Thanks much! 

 

Same here.

 

I love this workflow so much. Use it all the time, and it's soooo good.

Share this post


Link to post

Any chance of being able to configure this workflow to open in a new tab instead of a new window? Would work better with TotalTerminal: http://totalterminal.binaryage.com/

 

Unfortunately, this is in the hands of the ssh protocol handler (i.e. Terminal.app or iTerm.app). Easy to do in iTerm2, I don't have guidance for open-in-tab with Terminal.app.

Share this post


Link to post

Any chance of being able to configure this workflow to open in a new tab instead of a new window? Would work better with TotalTerminal: http://totalterminal.binaryage.com/

 

Are you aware of iTerm2's Hotkey Window? It provides arguably more powerful functionality to that of TotalTerminal, and iTerm2's default behaviour as ssh protocol handler is "Open in a New Tab". Performance improvements over the past year combined with the addition of Infinite Scrollback leave me little reason to fallback to Terminal.app or hacking SIMBL plugins :-)

Share this post


Link to post

Ok, if anyone else is curious, I opened a question at StackExchange:

 

http://apple.stackexchange.com/questions/144258/change-default-ssh-behavior

 

We'll see if that bears any fruit.

Like the SE thread says, your best bet is to create a "wrapper" application in Automator and fiddle with its Info.plist to make the app an ssh:// handler. Then you can use AppleScript in the app to tell whichever terminal app you like to open ssh:// URLs the way you want.

This is quite a useful pattern, and I've done something similar with Sublime Text, creating a wrapper app to open .sublime-project files with the subl CLI app.

Share this post


Link to post

I just completly reinstalled Alfred 3 with cleaned settings.

Still same behaviour. I have same problem with Evernote workflow. I think this will be Alfred 3 related.

Share this post


Link to post

Same problem here, solved by following these instructions:

 

http://www.alfredforum.com/topic/8927-cant-seem-to-get-comics-workflow-to-work/?p=44322

 

Perfect. Thanks, @okapi!

I was thinking I'd like to update to using the Alfred 2.4+ environment variables, but your tracking use of static paths down to a real issue gave me the impetus to actually do so.

The workflow has now been updated with enhanced Alfred 3 compatibility and is available on GitHub, here and on Packal.

Share this post


Link to post
36 minutes ago, Anmol Nagpal said:

Hello,

I"m trying to make it will iTerm, which I did use the link in Readme. But when I'm opening via Alfred iTerm start but then it closes itself 

 

That's what iTerm does when the connection fails. Are you sure the machine is responsive and the connection details are correct?

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...