Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command History in AIX

Status
Not open for further replies.

balajipn

Programmer
Mar 30, 2004
65
IN
Hi,

I am using AIX 4.3.3.

The editor is set to "vi" and vi bindings are working to get the command history (Esc-k works to get the previous commands). However, I would like to use up arrow and down arrow to see the previous and next commands.

Can some one point out what changes I need to make to achieve this?

Thanks,
Balaji.
 
There is nothing wrong with it. However, I am used to the Up-arrows and Down-arrows in other systems.

Thanks,
Balaji.
 
you may try to use bash instead of ksh, downloadable in aix toolbox
 
Hello,

try:

set -o emacs

in your .profile file

regards
Stefan
 
Hi Balaji,

I dont really use it myself, but you can use the following to setup a ksh session to use the arrow keys for command line history control.

Code:
set -o emacs   # Sets emacs mode.
alias __A="^P" # Sets Up    Arrow key for the previous command.
alias __B="^N" # Sets Down  Arrow key for the next command.
alias __C="^F" # Sets Right Arrow key for one character forwards.
alias __D="^B" # Sets Left  Arrow key for one character backwards.

Dont try cut and paste on the above, as the characters in the quotes are Control Characters.
(eg. ^P = CTRL+P which is one character)

Note that you use a double Escape key sequence for command completion.

Enjoy. :)



____________________
Sometimes it pays to stay in bed on Monday, rather than spending the rest of the week debuging Mondays code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top