Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List of zsh bindkey commands

Tags:

zsh

zsh-zle

Where can I find a list of zsh commands that I can use with bindkey, with descriptions?

Each time that I look for name of some standard action (e.g., end-of-line), I need to google and guess that the command found is what I look for.

Related:

  • Interpret zsh bindkey escaped sequences (SO)
  • The Z-Shell Line Editor (doc)
like image 847
Jakub M. Avatar asked Aug 04 '13 12:08

Jakub M.


People also ask

What is Bindkey?

bindkey is a tcsh shell command that is used to select, examine, and define key bindings for use in the Terminal.

How do you search zsh history?

To use it, press CTRL + R in your terminal session. This will change your terminal session to search mode, and you can type for previous commands. As you type, the shell will search for a matching command in the history and suggest it. To search for the next matching suggestion, press CTRL + R.

What is ZLE in zsh?

The Zsh Line Editor (ZLE) is the command prompt where you can write and edit your commands. The main keymap is the set of keystrokes which is loaded by default when Zsh is launched. The global keymap is the one used to edit commands in Zsh.


1 Answers

  • bindkey -l will give you a list of existing keymap names.

  • bindkey -M <keymap> will list all the bindings in a given keymap.

  • If you use the zsh command line in emacs mode, then the emacs keymap is likely to be most important for you.

  • If you use it in vi mode, then you’d be interested in viins and vicmd.

(See the zshzle(1) man page for more details.)

Once you have a list of keybindings, you can search the official ZLE documentation for the name of the action (or “widget” in zsh parlance).

like image 89
wjv Avatar answered Sep 29 '22 00:09

wjv