| Home Databases Development Genealogy Operating Systems Miscellaneous Help | ||
|
FAQSection Command line history i kshSet the invironment:
Section How can I activate command line history with arrow keys?
ksh is initially in vi mode. In this mode you can use command line history with the (cryptic) vi commands (e.g. ESC-k for the previous command or ESC-/ for the last command in the command history containing string). To use the arrow keys you have to switch to emacs mode. Then you can use the (also cryptic) emacs commands for editing the command line (e.g. CTRL-P for the previous command or CTRL-R string for the last command in the command line history containing string) and you can bind some emacs commands to arrow keys. Insert in your .profile or your ENVIRONMENT file the following lines:
set -o emacs # set emacs mode alias __A="^P" # arrow key for the previous command alias __B="^N" # arrow key for the next command alias __C="^F" # arrow key for one character forwards alias __D="^B" # arrow key for one character backwards To insert
|
|
|
|
||