Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by isometry

  1. Thanks for the bug report. I suspect an incompatibility with my JXA code and OSX 10.11; I'd only tested on 10.12 and 10.13 beta. I'm firing up a VM to investigate. Update: Please try my v1.2-beta1 pre-release for OSX 10.11 compatibility! I display the full session title as reported by iTerm2. In your case, I can only surmise that your sessions have tabs/sessions have been set as displayed. I suggest you refer to the iTerm2 FAQ and customise your shell to a title that better matches your needs. Unfortunately, iTerm2 doesn't expose the working directory, so this is unavailable to filter on without further effort on your part. I would suggest customising your tab titles through your shell (as above) to include the information you want to search on, or if they're long-running tweaking them manually with Cmd+I. The entire scrollback history is available, and I did play with filtering history (and the last line/screen of output, which commonly includes working directory). Unfortunately, performance goes down the drain as soon as you have a single pane with significant scrollback (I tend to run with unlimited scrollback), rendering the entire workflow unusable; I suppose I could expose this behind a default-disabled feature flag for those that don't rely on a large scrollback, but I'm not convinced it would be that useful… if anyone seriously thinks otherwise, log a feature request.
  2. A JXA-based workflow for Alfred 3 users to quickly switch between or close iTerm windows, tabs and panes based on title and tty, or trigger your preferred ssh workflow when no open session is found (supports both isometry/alfred-ssh and deanishe/alfred-ssh). GitHub: https://github.com/isometry/alfred-tty Latest Release: https://github.com/isometry/alfred-tty/releases/latest Usage Trigger the workflow with the keyword tty or via hotkey followed by some characters from the title of an open window, tab or pane; press Enter to activate the selected window/tab/pane, Alt-Enter to close it, or Cmd-Enter to trigger your ssh workflow. For example, enter tty as3 to switch to a tab with the title user@azure-server-03. If no active terminal matches, or you use the Cmd-modifier, trigger your preferred ssh workflow, e.g. ⇄ ssh as3. By default, the ssh workflow is assumed to be net.isometry.alfred.ssh (i.e. isometry/alfred.ssh, version 2.3+). Override by setting the ssh_workflow and ssh_trigger variables; for deanish/alfred-ssh, set the ssh_workflow variable to net.deanishe.alfred-ssh. In order to make working with more than one window/tab/pane with the same title easier, the tty is displayed beneath the result, and can be provided as a second argument to the trigger. For example, enter tty lo 3 to select the the session with title localhost running on /dev/ttys003. To select by tty alone, use two spaces between the trigger and the tty number. For example, tty 4 will select /dev/ttys004. Optionally associate a hotkey trigger to further accelerate operation, e.g. Ctrl+Cmd+T, or change the trigger word via the keyword variable. Combine with an iTerm2 profile configured as ssh protocol handler (e.g. Name:=$$USER$$@$$HOST$$, Command:=$$ and Schemes handled:=ssh) and an alfred-ssh workflow to make opening and jumping between remote sessions across many windows, tabs and panes easy.
  3. 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.
  4. I've upgraded to Alfred 3 myself now, but haven't encountered the issue reported by @kecinzer. However, I'm tracking the issue here: https://github.com/isometry/alfredworkflows/issues/6
  5. 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 :-)
  6. 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.
  7. 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.
  8. Given you're using this workflow, I'll assume you're happy at the command line :-) Change to the workflow's directory in Alfred preferences (found by right clicking on the Workflow and choosing "Show in Finder", if necessary), and run a query manually: % (Pythagoras:~/Dropbox/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.E2B2A958-21D2-42ED-B6DF-06AF15C6A201) /usr/bin/python -c 'import alfredssh; print alfredssh.complete("local");' <items><item arg="local" autocomplete="local" uid="ssh://local"><title>ssh://local</title><subtitle>Connect to ssh://local (source: input)</subtitle><icon>icon.png</icon></item><item arg="localhost" autocomplete="localhost" uid="ssh://localhost"><title>ssh://localhost</title><subtitle>Connect to ssh://localhost (source: /etc/hosts)</subtitle><icon>icon.png</icon></item><item arg="monster.local" autocomplete="monster.local" uid="ssh://monster.local"><title>ssh://monster.local</title><subtitle>Connect to ssh://monster.local (source: ~/.ssh/known_hosts)</subtitle><icon>icon.png</icon></item></items> The output shows the workflow offering to open ssh://local (from the input provided), ssh://localhost (from /etc/hosts), ssh://monster.local (from ~/.ssh/known_hosts) when triggered with the equivalent of "ssh local" in Alfred. If the above returns an empty list as opposed to an error or a valid list, then try running the function which parses ~/.ssh/config (which I assume is the config file you say is symlinked): % (Pythagoras:~/Dropbox/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.E2B2A958-21D2-42ED-B6DF-06AF15C6A201) /usr/bin/python -c 'import alfredssh; print alfredssh.fetch_ssh_config("~/.ssh/config");' ([u'host.example.com', u'monster'], '~/.ssh/ssh_config') You should get an entry for every non-wildcard entry in your ~/.ssh/config file (host lines which include any of *, ? or ! are excluded). NB: yes, there's currently an inconsistency. For some reason I chose to display entries from ~/.ssh/config as coming from ~/.ssh/ssh_config. Fix forthcoming.
  9. This is odd. Even if you just type "ssh randomhost" it should offer to "Connect to ssh://randomhost (source: input)". That your .ssh/ssh_config is a symlink, or on Dropbox should make no difference whatsoever. Can you provide any more detail?
  10. Refer to the instructions earlier in the thread for instructions on how to configure iTerm2.
  11. Amended reply #8 to resolve a bug with the suggested iTerm2 configuration in which a username, if specified, would be ignored by the iTerm2 ssh:// handler.
  12. A simple workflow to explore the English language via Agile Tortoise, Inc's excellent interface to Princeton University's WordNet database. Uses the keyword "term" followed by the word or term you want to define/explore. Download / Source If you like it, Agile Tortoise's Terminology app does the same thing for iPhone/iPad (NB: I have no affiliation to them). - isometry
  13. Something along the following lines should do the job: Create a new profile named "Man Page Handler" (or whatever) Set its command to "/usr/bin/man $$HOST$$" (without the quotes) Select "x-man-page" under "Schemes Handled"
  14. Use ~/.ssh/config (man ssh_config) to specify the private key to be used without having to type it every time. Robin
  15. @ctwise: excellent tips regards Selection in OS X and Automatically paste to front most app - thank you! I'll think about how best to integrate them into the release in such a way that (ideally) both behaviours are available. What you suggest is actually what I originally had in mind, though it doesn't necessarily fit well with, for example, selecting text from a terminal window. Regards the format of feedback, I did try it that way around, but because you can (and should!) define your own aliases, which (currently) lack descriptions, it didn't make sense to do so. I could change the syntax, of course: | define description==pipeline@@. What do you think?
  16. Very nice. Bug report: the copy to clipboard functionality seems to be a little broken for TXT records (or probably any which include quotes), e.g. dig google.com txt
  17. Others have mentioned it already, but my ssh workflow is what I've wanted from Alfred since I first lumped for a Mega Supporter license in his infancy over two years ago. As soon as I found the new Script Filter object, I knew what I had to do. Having not yet found this forum, I started by reverse engineering David's PHP-based built-in Google Suggest workflow to figure out what my Python script had to output to get a result. D'oh My pipe workflow isn't getting much love, probably because I haven't sold it very well, but I'm also using that *alot* to filter and transform text. Others I currently find myself using regularly: - Colors by Tyler Eich - Create OmniFocus Tasks by Aaron B. Hockley (great for adding a todo for an item in Gmail) - Movies by Simon Støvring (inspiringly awesome)
  18. Not sure people are feeling the love for this one so I've added some built-in one-liners to try and illustrate its power. I've used it at least 5 times today already. Examples include: filtering the contents of the clipboard with grep modifying the contents of the clipboard with sed, awk or perl base64 encoding/decoding the clipboard encrypting/decrypting the clipboard with AES-256 sorting the clipboard reversing the lines in the clipboard strip blank lines from the clipboard upper/lowercasing the clipboard add line numbers to the clipboard full listing of the built-ins
  19. iTerm2 will do this by default, but I'm not aware of a way to get Terminal.app to do this. iTerm2 also has the advantage that it can be made to set the tab title properly (see post #8).
  20. Added support for command aliasing: alias commonly used one-liners to one-word aliases. | alias myalias=arbitrarily -complex | pipeline@@ | myalias | alias lc perl -nle 'print lc'@@ | lc
  21. Added a Hotkey object to the start of the workflow: once defined, you can save a few keystrokes. Copy the text you want to process, hit your hotkey, enter your one-liner and paste the results.
  22. Bah. Never mind. I've been deliberating on a clearer explanation for a while, but in the end the best case for something reasonable is that it saves me having to hit Cmd+C before hitting my workflow's hotkey. Not worth the effort.
  23. I've begun implementing this here.
  24. Your iTerm ssh: handling Profile needs to specify the Command as ssh $$HOST$$ (prefix ssh with the appropriate path if you've installed a new version through MacPorts/homebrew/fink). zsh shouldn't come into it. See post #8 in this thread.
  • Create New...