Blog entries tagged “iTerm”

Monday, february 1st, 2010

Launching iTerm shells from Quicksilver

I recently decided to give iTerm a try, so I needed a way to launch shells and other things requiring a terminal the same way I launched them inside rxvt-unicode: using Quicksilver.

I suppose I could use AppleScript to do this, but…

  1. I don’t really like its syntax;
  2. I’m currently addicted to python;

So I made qslaunch, a very small python package to help do the job, and this little post to tell how to use it :)

In this post, I’m assuming some knowledge of python, regular expressions and how to use a shell.

I won’t detail things too much either as I think the code speaks by itself.

Read the whole post…
Posted at 20:13
Anglais seulement
Tags: iTerm · python · qslaunch · Quicksilver
Sunday, january 24th, 2010

iTerm: word shortcuts

In a terminal, I need both the “option” key to access alternate glyphs, like “•”, “∞” and French accents, like “é”, and to act like a “meta” key, which essentially sends an “escape” character followed by the key value.

Obviously a key can’t be two things at the same time, at least on Os X. On other Unix-like systems, you often have the left “alt” playing the role of the meta key, and the right “alt” playing the “altgr” role.

Some of the shortcuts I use the most are word navigation, using meta-left-arrow and meta-right-arrow, and word deletion, with meta-backspace (or “meta-delete” on Macs) to delete the word on the left, and meta-d to delete the word on the right.

So here are my recipies to bind those keys in iTerm.

Read the whole post…
Posted at 02:23
Tags: iTerm · osx · terminal
Sunday, january 24th, 2010

iTerm: extend the “send text” action

iTerm's key mapping system allows for a number of possible “actions”:

  • “send escape sequence” simply sends a “\e” followed by the text as-is;
  • “send hex code” scans for one 8-bit code, and sends that;
  • “send text” allows for “\e” (escape), “\n” (newline), “\a” (bell), and “\t” (tab), and normal text.

The goal of this small patch is to add two escape sequences to the “send text” action:

  • “\\” to send a single backslash;
  • “\xAA” or “\xBBBB” to send an arbitrary unicode character specified in hexadecimal.

For example, to bind the conventional “backward-kill-word” to option-delete (or alt-delete or meta-delete, or “backspace” on PC keyboards), you can simply add a key mapping for “delete”, checking “option”, selecting “send text” as the action, and typing, in the text box, “\e\x7f”.

From then on, hitting option-delete will delete the word on the left of the cursor :)

Read the whole post…
Posted at 01:30
Anglais seulement
Tags: iTerm · osx · terminal