Operating System - HP-UX
1834842 Members
2114 Online
110070 Solutions
New Discussion

How set default emacs in ksh

 
SOLVED
Go to solution
j773303
Super Advisor

How set default emacs in ksh

As title.
I try to use "ksh -o emacs".
But I can not use keyboard UP and DOWN button to find the command history. Does anybody can tell me how to let ksh can search command by UP and DOWN button.
Thanks.

Hero
5 REPLIES 5
AwadheshPandey
Honored Contributor

Re: How set default emacs in ksh

You can use ksh -o vi and esc k to see previous commands see this link also.
http://www.informatik.uni-frankfurt.de/doc/man/hpux/ksh.1.html

Awadhesh
It's kind of fun to do the impossible
j773303
Super Advisor

Re: How set default emacs in ksh

Yes, I know it can be use "ksh -o vi"
But the the customer has the problem about "ksh -o emacs"? I also can not use "UP" "DOWN" to find previous command by emacs in hpux. Do anyone know how to fix this problem? Thanks again.
Hero
Senthil Kumar .A_1
Honored Contributor

Re: How set default emacs in ksh

Hi,

Apart from issuing "ksh -o emacs" have you enabled history feature in your profile.

Please make sure these variables are defined in your .profile file in home directory.. "HISTFILE" and "HISTSIZE".

#echo $HISTFILE
#echo $HISTSIZE

If not defined please consider defining one as follows in your .profile

HISTFILE=~/.sh_history
HISTSIZE=200
export HISTFILE
export HISTSIZE


Regards,
Senthil Kumar .A
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
j773303
Super Advisor

Re: How set default emacs in ksh

Hi,
I try to
HISTFILE=~/.sh_history
HISTSIZE=200
export HISTFILE
export HISTSIZE

But ksh -o emacs, still can't use "UP" and "DOWN" button to find the previous command.

Any comments please advise, thanks again
Hero
Peter Nikitka
Honored Contributor
Solution

Re: How set default emacs in ksh

Hi,

I think you'll have to use
^p (Ctrl p, previous) for UP and
^n (Ctrl n, next) for DOWN
navigation - just the same keys as in emacs.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"