mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 20:33:44 +08:00
885d16fcd6
darcs-hash:20061031152316-ac50b-e68db9853d6e9461a0c054f1ea290704ccfc0a31.gz
24 lines
1.0 KiB
Plaintext
24 lines
1.0 KiB
Plaintext
\section bind bind - handle key bindings
|
|
|
|
\subsection bind-synopsis Synopsis
|
|
<tt>bind [OPTIONS] [BINDINGS...]</tt>
|
|
|
|
The <tt>bind</tt> builtin causes fish to add the readline style bindings specified by BINDINGS to the list of key bindings, as if they appeared in your <tt>~/.fish_inputrc</tt> file.
|
|
|
|
For more information on the syntax keyboard bindings, use <tt>man
|
|
readline</tt> to access the readline documentation. The availiable commands
|
|
are listed in the <a href="index.html#editor">Command Line Editor</a> section
|
|
of the fish manual - but you may also use any fish command! To write such
|
|
commands, see the <a href="#commandline">commandline</a> builtin. It's good
|
|
practice to put the code into a <tt><a href="#function">function</a> -b</tt>
|
|
and bind to the function name.
|
|
|
|
\subsection bind-description Description
|
|
- <tt>-M MODE</tt> or <tt>--set-mode=MODE</tt> sets the current input mode to MODE.
|
|
|
|
\subsection bind-example Example
|
|
|
|
<tt>bind -M vi</tt> changes to the vi input mode
|
|
|
|
<tt>bind '"\\M-j": jobs'</tt> Binds the jobs command to the Alt-j keyboard shortcut
|