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>



VMware Server: Convert Fixed Disk-images to Growable|(0)

Quick tip if you ever want to convert from a fixed disk image to an expandable one then the following command should do it:

sudo vmware-vdiskmanager -r source.vmdk -t 0 expandable.vmdk

Just replace “source” and “expandable” with your disk image file names. For more on what vmware-vdiskmanager can do for you type vmware-vdiskmanager -h

SVN Tip: Get List of Files Changed Between Revisions|(0)

svn diff -r REVNO:HEAD --summarize

Just replace REVNO with the start revision and HEAD with the end revision if you don’t want it to be the latest revision.

Photos on Flickr

© Copyright 2004-08 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by 1&1 This page was baked in 0.804s.