mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-30 17:41:14 -03:00
docs: Format keychords as two :kbd: entries
Looks better in the html - see #6752. Also this converts the "ctrl-something" instances I could find to proper markup. [ci skip]
This commit is contained in:
@@ -20,7 +20,7 @@ Description
|
||||
|
||||
``bind`` adds a binding for the specified key sequence to the specified command.
|
||||
|
||||
SEQUENCE is the character sequence to bind to. These should be written as :ref:`fish escape sequences <escapes>`. For example, because pressing the Alt key and another character sends that character prefixed with an escape character, Alt-based key bindings can be written using the ``\e`` escape. For example, :kbd:`Alt+w` can be written as ``\ew``. The control character can be written in much the same way using the ``\c`` escape, for example :kbd:`Control+X` (^X) can be written as ``\cx``. Note that Alt-based key bindings are case sensitive and Control-based key bindings are not. This is a constraint of text-based terminals, not ``fish``.
|
||||
SEQUENCE is the character sequence to bind to. These should be written as :ref:`fish escape sequences <escapes>`. For example, because pressing the Alt key and another character sends that character prefixed with an escape character, Alt-based key bindings can be written using the ``\e`` escape. For example, :kbd:`Alt` + :kbd:`w` can be written as ``\ew``. The control character can be written in much the same way using the ``\c`` escape, for example :kbd:`Control` + :kbd:`X` (^X) can be written as ``\cx``. Note that Alt-based key bindings are case sensitive and Control-based key bindings are not. This is a constraint of text-based terminals, not ``fish``.
|
||||
|
||||
The default key binding can be set by specifying a ``SEQUENCE`` of the empty string (that is, ``''`` ). It will be used whenever no other binding matches. For most key bindings, it makes sense to use the ``self-insert`` function (i.e. ``bind '' self-insert``) as the default keybinding. This will insert any keystrokes not specifically bound to into the editor. Non- printable characters are ignored by the editor, so this will not result in control sequences being printable.
|
||||
|
||||
@@ -193,7 +193,7 @@ Examples
|
||||
|
||||
bind \cd 'exit'
|
||||
|
||||
Causes ``fish`` to exit when :kbd:`Control+D` is pressed.
|
||||
Causes ``fish`` to exit when :kbd:`Control` + :kbd:`D` is pressed.
|
||||
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ Performs a history search when the :kbd:`Page Up` key is pressed.
|
||||
set -g fish_key_bindings fish_vi_key_bindings
|
||||
bind -M insert \cc kill-whole-line force-repaint
|
||||
|
||||
Turns on Vi key bindings and rebinds :kbd:`Control+C` to clear the input line.
|
||||
Turns on Vi key bindings and rebinds :kbd:`Control` + :kbd:`C` to clear the input line.
|
||||
|
||||
.. _cmd-bind-escape:
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ The delay in milliseconds since the previous character was received is included
|
||||
|
||||
``fish_key_reader`` intentionally disables handling of many signals. To terminate ``fish_key_reader`` in ``--continuous`` mode do:
|
||||
|
||||
- press ``Ctrl-C`` twice, or
|
||||
- press ``Ctrl-D`` twice, or
|
||||
- press :kbd:`Control` + :kbd:`C` twice, or
|
||||
- press :kbd:`Control` + :kbd:`D` twice, or
|
||||
- type ``exit``, or
|
||||
- type ``quit``
|
||||
|
||||
@@ -15,7 +15,7 @@ Description
|
||||
|
||||
``funced`` provides an interface to edit the definition of the function ``NAME``.
|
||||
|
||||
If the ``$VISUAL`` environment variable is set, it will be used as the program to edit the function. If ``$VISUAL`` is unset but ``$EDITOR`` is set, that will be used. Otherwise, a built-in editor will be used. Note that to enter a literal newline using the built-in editor you should press :kbd:`Alt+Enter`. Pressing :kbd:`Enter` signals that you are done editing the function. This does not apply to an external editor like emacs or vim.
|
||||
If the ``$VISUAL`` environment variable is set, it will be used as the program to edit the function. If ``$VISUAL`` is unset but ``$EDITOR`` is set, that will be used. Otherwise, a built-in editor will be used. Note that to enter a literal newline using the built-in editor you should press :kbd:`Alt` + :kbd:`Enter`. Pressing :kbd:`Enter` signals that you are done editing the function. This does not apply to an external editor like emacs or vim.
|
||||
|
||||
If there is no function called ``NAME`` a new function will be created with the specified name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user