Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using ksh on Mac OS X 10.6 xterm (that is, not using Terminal.app).

When I try to browse the command history via CTRL+P or try to move the cursor on my prompt via CTRL+B, only the characters ^P or ^B respectively are shown. Do I have to set some special environment variables or use some inputrc magic to trigger the expected effects?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

ksh on OSX is actual ksh, not bash. This means that (a) it doesn't use ~/.inputrc and (b) you need to turn on line editing explicitly with set -o emacs or set -o gmacs, or arrange for $EDITOR or $VISUAL environment variables to have a value that ends with macs so ksh will turn on Emacs-style line editiing automatically. Since $EDITOR is not especially useful in an age of GUIs, adding test -t 0 && set -o emacs to ~/.kshrc is probably the way to go.

share|improve this answer
    
worked for me, thank you –  bcml Apr 4 '11 at 21:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.