Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I used to use Up/Down to move through the history of commands. Then, a few days later it changed to Ctrl-p/Ctrl-n. Now this also doesn't work to move through the history of commands entered.

How can I view all these settings or change it? I tried to see the terminal setting by giving the command stty but it was of no help. I searched through Google and found something called bindkey. I hope I am moving in the right direction.

I am not the root user, anyway I would like to know more about this even if could do nothing about it.

KORN SHELL

**OS Info :**
rcihp145 :/home/msingh2> uname -a
HP-UX rcihp145 B.11.23 U 9000/800 3683851961 unlimited-user license
share|improve this question
1  
If your shell behavior is changing, my guess is that your admin is making changes to the default shell profile /etc/profile. You should contact the admin and ask. If you changed something, anything, you need to describe the change in your question. Please add distro and terminal used too. –  bdowning Feb 9 '12 at 11:50
    
hmm..i havnt done any changes, perhaps they are done by admin then –  munish Feb 9 '12 at 12:01
1  
set -o emacs is the setting for up/down ctrl-p/ctrl-n but whether the up/down works or not can be changed by .Xresources settings for xterm. Again, if this worked, and then stopped working, something was changed. The xterm faq has the settings for arrow keys (and many others) –  bdowning Feb 9 '12 at 12:11
1  
@bdowning A system administrator that would change these kind of settings on a regular basic would be a very lousy admin. –  Bernhard Feb 9 '12 at 13:01
    
@Bernhard agreed! –  bdowning Feb 9 '12 at 13:02

1 Answer 1

up vote 1 down vote accepted

You are using ksh (the Korn shell). This shell is fairly primitive in terms of command line capabilities, but do check the “key bindings” or “line editing” section to see what your version of ksh can do.

History navigation with Ctrl+P and Ctrl+N works in all ksh versions that I know of. They might be disabled in a configuration file; look in ~/.kshrc to see what has been configured.

There are shells with better and more configurable line edition capabilities: zsh and the more popular but less powerful bash. bindkey is a zsh command, and bind is its bash equivalent.

share|improve this answer
    
thanks @Gilles you are fantastic –  munish Feb 10 '12 at 4:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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