Muffinresearch Labs by Stuart Colville

Fixing the display of history in terminal.app | Comments (0)

Posted in Apple, Code on 1st June 2008, 6:29 pm by Stuart

Once I started using leopard’s new shiny terminal I noticed some problems with the terminal whenever I was using the cursor keys to access items in the memory.

What happens is the lines of history appear to start halfway through a previous line of history like so:

terminal app showing "cd '/Volumes/Homeless README"

For a while I’ve been blaming the terminal when in fact it was totally my fault. The problem occurs when you have incorrectly escaped your prompt.

The details of the correct color escape sequence can be found at tdlp.org

Once I’d corrected my escaping the problem was fixed and now history works as expected. What’s interesting is that I’ve been using the same prompt for ages on Tiger and had never had that problem although for the best part of a year I have been using iTerm, and I’m not sure if there’s something about tiger’s terminal or iTerm that makes it more forgiving of dodgy escape sequences.

Post Tools

Comments: Add yours







XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



GNU screen: open tab in current working directory|(1)

A nice trick for having screen open a new tab in the same directory as the one you’re currently in. To use it add it to your .screenrc

# Open new window in current dir.
bind c stuff "screen -X chdir \$PWD;screen^M"
bind ^c stuff "screen -X chdir \$PWD;screen^M"

Hat tip: mteckert on SuperUser.com

Ubuntu: add-apt-repository: command not found|(2)

When you’re using a minimal Ubuntu install if you find the ‘add-apt-repository’ command is missing (it’s useful for adding PPAs and other repositories), then simply run:

sudo apt-get install python-software-properties

Photos on Flickr

© Copyright 2004-12 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 0.523s.