ksh for linux

MYERS gmyers at ufpsprod.attmail.com
Tue Jan 23 14:27:03 EST 1996


} I have used pdksh. I didnt' use it too long because I did not have 
} the time to figure out how to use the arrow keys. Does anyone have any
} suggestions. I am using zsh now but would prefer to use ksh/pdksh.
} 
} Thanks,
} Bruce Browning       browninb at swsmail.atlanta.com

If you are referring to navigating history, you don't use the cursor
keys.  ksh will allow you to set it up to recognize either vi or emacs
commands.  I'm not sure about pdksh, although, I use vi and I know the
vi commands work with pdksh, I'm just not sure about emacs.  Anyway, for
history navigation, you use the same keys you use with vi, 'l' moves you
right on the current line, 'h' moves you left on the current line, 'k'
moves to the previous command in history, 'j' moves you to the next command
in history.  Just think of yourself of being in a oneline visual editor.
You must set the variable EDITOR to your preferred editor for this to work.

Now if you set the variable VISUAL to your preferred editor, you can also
enter the 'v' key when in command mode of ksh history and it will drop you
into your favorite editor with the current command.

By the way, this reminds me of one of the deficiencies of pdksh vs ksh. In
ksh, if you are going through your history of commands, and happen upon one
that is a multi-line command, such as:

while :; do
foo
done

and you enter the 'v' key to enter your editor, all lines of the command will
be pulled into the editor.  With pdksh, it will only pull the last line in,
which is pretty much useless.  This to me is a minor problem and for those 
that prefer the ksh, I would highly recommend the pdksh over bash or zsh.
It is the closest look alike and you won't have to relearn anything.  If you
want the cursor history as in dogkey, you may want to stick with bash.



       Until later,       attmail!gamyers      ph  404.810.3250
       Geoffrey Myers                          fax 404.810.2487

       floc 6E26, 1200 Peachtree, Promenade II, Atlanta, GA 30309

      gamyers at attmail.com   geof at denali.is.net   eiger at ichange.com






More information about the Ale mailing list