Table of Contents

ZSH LINE EDITOR

If the ZLE option is set (it is by default) and the shell input is attached to the terminal, the user is allowed to edit command lines.

There are two display modes. The first, multiline mode, is the default. It only works if the TERM parameter is set to a valid terminal type that can move the cursor up. The second, single line mode, is used if TERM is invalid or incapable of moving the cursor up, or if the SINGLE_LINE_ZLE option is set. This mode is similar to ksh, and uses no termcap sequences. If TERM is "emacs", the ZLE option will be unset by the shell.

Bindings

Command bindings may be set using the bindkey builtin. There are two keymaps-the main keymap and the alternate keymap. The alternate keymap is bound to vi command mode. The main keymap is bound to emacs mode by default. To bind the main keymap to vi insert mode, use bindkey -v. However, if one of the VISUAL or EDITOR environment variables contain the string vi when the shell starts up the main keymap will be bound to vi insert mode by default.

The following is a list of all the key commands and their default bindings in emacs and vi command mode.


Mark D. Borges