Turning cursor visible in Terminal.app

October 10, 2007 | Comments Off

This is a quick tip. Since switching to Mac, one of the minor annoyances was that when my ssh sessions were terminated when I was running an application that disabled the cusors (usually mutt), I would be stuck without a cursor. I expiremented with stty and tset for a while until I ended up with old trusty escape codes. I created a shell function called ‘ssh‘ that looks like this:

function ssh { /usr/bin/ssh $*; echo -n '^[[?25h'; }

The trick is to make sure the “^[” is an escape character. Put vim into insert-mode, hit CTRL-V, escape where that character is supposed to be.


No Comments yet

Sorry, the comment form is closed at this time.