Created
January 8, 2011 10:21
-
-
Save ndreas/770735 to your computer and use it in GitHub Desktop.
Changes to the Quicksilver iTerm plugin to make it work with iTerm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The changes were made twice in the binary "iTerm Module" since the script is embedded twice. I just opened the binary in Vim and searched for "activate" to find the scripts. | |
Changes: | |
- Create a new window instead of a tab (I prefer it that way) | |
- Launch the default session instead of creating a new session | |
- Disable the bash-commands since it overrode my default shell, zsh | |
The strange indentation in the modified file is due to the fact that the binary b0rks if the string length is changed. If it does not work, try removing or adding characters in the script. Quicksilver generates an error message on startup (for example in Console.app) if there is something wrong with the binary. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "iTerm" | |
activate | |
set aterm to (make new terminal) | |
tell aterm to launch session "Default" | |
tell aterm to set asession to current session | |
--to exec command "/bin/bash --login" | |
tell asession to write text "%@" | |
end tell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "iTerm" | |
activate | |
set aterm to (first terminal) | |
tell aterm to set asession to (make new session at the end of sessions) | |
tell asession to exec command "/bin/bash --login" | |
tell asession to write text "%@" | |
end tell |
Works great. Not sure why my edits didn't. Thank you very much!
@mankoff: Try my new plugin: https://github.com/ndreas/iTerm2-qsplugin/downloads
I type a folder name, hit tab, and type 'iterm' and nothing shows up with this plugin. With the previous one, I could select "Go to directory in iTerm".
I only used the Terminal commands with iTerm set as the provider, so the plugin only supported those commands. However, I've updated the plugin to supply iTerm-specific commands: https://github.com/ndreas/iTerm2-qsplugin/downloads
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@mankoff: http://dl.dropbox.com/u/1434942/iterm-mod.tar.bz2 see if that one works for you.
@skurfer: a rewrite would be best, I'll take a look at it. I've skimmed through the code for the Terminal plugin and it doesn't seem that difficult to make a corresponding plugin for iTerm2. I'll just have to learn Objective C :)