isometry
-
Posts
47 -
Joined
-
Last visited
-
Days Won
1
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Posts posted by isometry
-
-
-
15 hours ago, Maddog said:
1) It lists the tabs/panes, but Enter does not activate iTerm for me.
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!
Quote2) Also, see attached screenshot, any idea why it doesn't fill the available space? Almost every entry is cut off (oh actually in most only the path is cut-off, but I would prefer to see it, or part of it, if there's space).
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.
Quote3) See that npm (node) line in the screenshot? Is it possible for it to be searchable by the working directory it's running from?
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.
-
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; pressEnter
to activate the selected window/tab/pane,Alt-Enter
to close it, orCmd-Enter
to trigger your ssh workflow. For example, entertty as3
to switch to a tab with the titleuser@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 thessh_workflow
andssh_trigger
variables; for deanish/alfred-ssh, set thessh_workflow
variable tonet.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 titlelocalhost
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 thekeyword
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. -
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.
-
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
-
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 :-)
-
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.
-
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.
-
Errr, I would, but I don't get any other errors or anything. I downloaded it from Packal, if that makes any difference. Anything in particular I can do to help debug?
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.
-
This workflow isn't working for me, and I think it's because my config file is symlinked to Dropbox. When I type in `ssh` and start writing a hostname, it says "please wait" or whathaveyou for a split second before dropping me back to the standard Google prompt. Could the symlink be the issue?
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?
-
I am using your Workflow with iTerm2 and zsh, and is not working. I am sorry but i don´t understand how the settings should look like.
Will be great if you could help me. Here is a screenshot from my iTerm2 Profile Settings [http://screencast.com/t/GAjTiIxyjVO]
Refer to the instructions earlier in the thread for instructions on how to configure iTerm2.
-
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.
-
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.
If you like it, Agile Tortoise's Terminology app does the same thing for iPhone/iPad (NB: I have no affiliation to them).
- isometry
-
"can easily be switched to iTerm2.app" - How?
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"
-
Great extension. Works like a charm.
Any chance to make it work with the "-i" argument? To ssh to those servers that need the private key file to access. That would be awesome
Use ~/.ssh/config (man ssh_config) to specify the private key to be used without having to type it every time.
Robin
-
@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?
-
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
-
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)
-
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
-
Any way to get it to open in a tab in the existing terminal?
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).
-
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
-
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.
-
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.
-
Nice, looking at the trailer site it calls a simple URL to search for the trailers and returns a JSON string of them with posters.
Might be able to parse that into alfred to search for and open trailers directly.
I've begun implementing this here.
ssh
in Completed
Posted
SSH workflow for Alfred for Mac with powerful hostname expansion/completion
GitHub: https://github.com/isometry/alfred-ssh
Forum:
Screenshots: