It is currently Mon, 18 Mar 2024 17:13:09 GMT



 
Author Message
 ksh command line history
I am just starting out with ksh cause that is what I am forced to use
at work.  I am a bash fan, and I got real comfortable with command line
history, and editing.  I have heard about the EDITOR var being set to
vi or emacs, but I dont know if this will help with command line
history. Can someone help me out?

Thanks in advance
dg

Sent via Deja.com http://www.**-**.com/
Before you buy.



 Tue, 27 Aug 2002 03:00:00 GMT   
 ksh command line history

There are 2 command line options that I know of, emacs and vi
I prefer emacs.
You can set your command line editing in one of two ways:
set the VISUAL parameter, for example

1st option
VISUAL=$(whence emacs) or VISUAL=$(which emacs)
OR
VISUAL=$(whence vi) or VISUAL=$(which vi)

2nd option
set -o emacs
OR
set -o vi

I find the second option to be most reliable.
Whichever option you use, remember to update your .profile.
If setting VISUAL then "export VISUAL=$(which emacs)"
or if you know the full path then don't use $().

some emacs commands
ctl-p - previous command
ctl-n - next command
ctl-b - backwards
ctl-f - forwards
del - del char

Hope this helps;
knowledge is the key to data
Peter;



 Tue, 27 Aug 2002 03:00:00 GMT   
 ksh command line history
In article <38C97B6D.3159A...@enterprise.net>,
Peter Koukoulis  <dag...@enterprise.net> wrote:

I prefer vi.

What would be the equivalent with "set -o vi" in effect?
I.e., How do I get the up arrow key to do what Esc k currently does?



 Sun, 01 Sep 2002 03:00:00 GMT   
 ksh command line history
It was: 15 Mar 2000 11:04:41 -0600  and with STARTLING insight,
"gaze...@yin.interaccess.com (Kenny McCormack)"
  posted "Re: ksh command line history"
 to "comp.unix.shell" :

-->In article <38C97B6D.3159A...@enterprise.net>,
-->Peter Koukoulis  <dag...@enterprise.net> wrote:
-->>
-->>There are 2 command line options that I know of, emacs and vi
-->>I prefer emacs.
-->
-->I prefer vi.
-->
-->>some emacs commands
-->>ctl-p - previous command
-->>ctl-n - next command
-->>ctl-b - backwards
-->>ctl-f - forwards
-->>del - del char
-->
-->What would be the equivalent with "set -o vi" in effect?
-->I.e., How do I get the up arrow key to do what Esc k currently does?

On an aix system, with " set -o vi " set, we would use ~standard~ movement
commands, after first hitting the escape key:  j key is down one line, k
key is up one line, w is scroll up one page, d is scroll down one page, g
is go to first line, G is go to last line, etc.       /ts

              tenox  @  home  dot   com



 Wed, 18 Sep 2002 03:00:00 GMT   
 
   [ 4 post ] 

Similar Threads

1. rememeber history of tcshell command line commands after reboot

2. using the command history with read in ksh

3. Is there a history command for ksh?

4. ksh command history

5. no command history with ksh as root?

6. How to enable command history in ksh shell?

7. Problem with ksh command history

8. vi, ksh, Command History, and Arrow Keys: Impossible?

9. ksh command history?

10. ksh command history gets full !!???


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software