Command line editing with the Korn shell

The method for command line editing depends upon the value to which the environment variables EDITOR and\or VISUAL are set. This can be emacs, gmacs or vi.

To use the editing commands provided by the EMACS editor you would add the following line to your .profile file.

   EDITOR=emacs

The value of the VISUAL variable takes precedence over the the value of the EDITOR variable.

Command line editing can also be turned on by using a shell command to set an option to one of the above values. For example:

   set -o vi

This command can be given on the command line or included in your .profile file.

If emacs or gmacs is set, command line editing is in the style of the EMACS editor; if vi is set editing is in the style of the vi editor.


Top document