mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 11:47:04 +08:00
Fix doc formatting
This is RST, not markdown
This commit is contained in:
parent
ec603790d1
commit
53961c7759
|
@ -23,19 +23,22 @@ Notable backwards-incompatible changes
|
|||
|
||||
- Fish now decodes keyboard input into human-readable key names.
|
||||
To make this for for a wide range of terminals, fish asks terminals to speak several keyboard protocols,
|
||||
including CSI u, XTerm's ``modifyOtherKeys`` and some progressive enhancements from the [kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/).
|
||||
including CSI u, XTerm's ``modifyOtherKeys`` and some progressive enhancements from the `kitty keyboard protocol <https://sw.kovidgoyal.net/kitty/keyboard-protocol/>`.
|
||||
Depending on terminal support, this allows to bind a lot more key combinations,
|
||||
including arbitrary combinations of modifiers ``ctrl``, ``alt`` and ``shift``.
|
||||
|
||||
This comes with a new syntax for specifying keys to builtin ``bind``.
|
||||
The new syntax introduces modifier names and names for some keys that don't have an obvious and printable Unicode code point.
|
||||
The old syntax remains mostly supported but the new one is preferred.
|
||||
|
||||
- Existing bindings that use the new names have a different meaning now.
|
||||
For example
|
||||
|
||||
- ``bind up 'do something'`` binds the up arrow key instead of a two-key sequence.
|
||||
- ``bind ctrl-x,alt-c 'do something'`` binds a sequence of two keys.
|
||||
Since ``,`` and ``-`` act as separators, there are some cases where they need to be written as ``comma`` and ``minus`` respectively.
|
||||
Since ``,`` and ``-`` act as separators, there are some cases where they need to be written as ``comma`` and ``minus`` respectively.
|
||||
- To minimize gratuitous breakage, the key argument to ``bind`` is parsed using the old syntax in two cases:
|
||||
|
||||
- If key starts with a raw escape character (``\e``) or a raw ASCII control character (``\c``).
|
||||
- If key consists of exactly two characters, contains none of ``,`` or ``-`` and is not a named key.
|
||||
|
||||
|
|
|
@ -557,6 +557,8 @@ To find out the name of a key, you can use :doc:`fish_key_reader <cmds/fish_key_
|
|||
|
||||
> fish_key_reader # Press Alt + right-arrow
|
||||
Press a key:
|
||||
bind alt-right 'do something'
|
||||
|
||||
Note that some key combinations are indistinguishable or unbindable. For instance control-i *is the same* as the tab key. This is a terminal limitation that fish can't do anything about. When ``fish_key_reader`` prints the same sequence for two different keys, then that is because your terminal sends the same sequence for them.
|
||||
|
||||
Also, :kbd:`Escape` is the same thing as :kbd:`Alt` in a terminal. To distinguish between pressing :kbd:`Escape` and then another key, and pressing :kbd:`Alt` and that key (or an escape sequence the key sends), fish waits for a certain time after seeing an escape character. This is configurable via the :envvar:`fish_escape_delay_ms` variable.
|
||||
|
|
Loading…
Reference in New Issue
Block a user