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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command History

Status
Not open for further replies.

Rvir

Programmer
May 16, 2007
18
US
Iam in korn shell on Linux machine. Its default environment. Here iam trying to use up, down, left and right arrows to view command history and make changes to command line statements but whenever i try to use them iam printing these ^[ characters .Some body help me to use the arrow keys on the keyboard.
 
And what about man ksh ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I did check the man page .Could you explain me what am i suppose to do?
 
No explanation on how to navigate the history depending Emacs or vi mode in your man page ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hi Rvir,

If you're using vi or view tht file use the following keys instead of the arrow keys... k=right, j=left l=up , g=down

Give that a try.

Good luck,

DrD
 
Put these lines in your [tt].kshrc[/tt]
Code:
alias __A=`echo "\020"`
alias __B=`echo "\016"`
alias __C=`echo "\006"`
alias __D=`echo "\002"`
alias __H=`echo "\001"`

set -o emacs
Make sure your [tt].profile[/tt] has this in it...
Code:
export ENV=~/.kshrc
Then log out and back in.
 
Thanks for your response. I do not see .profile under my home directory but there is one under root so i do not know if i can make changes to the root .profile.
 
You can create your own [tt].profile[/tt] and your shell will run it automatically. It's part of what it does. See the man page.

Then you can add your own [tt].kshrc[/tt] too.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top