2006-10-31 15:23:16 +00:00
\section bind bind - handle key bindings
2005-09-20 13:31:55 +00:00
\subsection bind-synopsis Synopsis
2006-09-19 14:52:03 +00:00
<tt>bind [OPTIONS] [BINDINGS...]</tt>
2005-09-20 13:31:55 +00:00
2006-09-19 14:52:03 +00:00
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
2007-08-01 17:35:24 +00:00
readline</tt> to access the readline documentation. The available commands
2006-09-19 14:52:03 +00:00
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.
2005-09-20 13:31:55 +00:00
\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