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?

link|improve this question
feedback

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.

link|improve this answer
worked for me, thank you – msiemeri Apr 4 '11 at 21:15
feedback

Your Answer

 
or
required, but never shown

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