mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 15:14:44 +00:00
docs: Fix spacing on key combinations
This commit is contained in:
parent
90b46c72c8
commit
54da5b82ba
6 changed files with 56 additions and 56 deletions
|
@ -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` + :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``.
|
||||
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` + :kbd:`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` + :kbd:`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 :kbd:`Control` + :kbd:`C` twice, or
|
||||
- press :kbd:`Control` + :kbd:`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` + :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 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
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ If you want to change or disable this display, modify the `fish_mode_prompt` fun
|
|||
|
||||
How do I run a command from history?
|
||||
------------------------------------
|
||||
Type some part of the command, and then hit the :kbd:`↑` (up) or :kbd:`↓` (down) arrow keys to navigate through history matches. Additional default key bindings include :kbd:`Control` + :kbd:`P` (up) and :kbd:`Control` + :kbd:`N` (down).
|
||||
Type some part of the command, and then hit the :kbd:`↑` (up) or :kbd:`↓` (down) arrow keys to navigate through history matches. Additional default key bindings include :kbd:`Control`\ +\ :kbd:`P` (up) and :kbd:`Control`\ +\ :kbd:`N` (down).
|
||||
|
||||
|
||||
How do I run a subcommand? The backtick doesn't work!
|
||||
|
@ -234,11 +234,11 @@ Fish's history recall is very simple yet effective:
|
|||
|
||||
- If the line you want is far back in the history, type any part of the line and then press Up one or more times. This will filter the recalled lines to ones that include this text, and you will get to the line you want much faster. This replaces "!vi", "!?bar.c" and the like.
|
||||
|
||||
- :kbd:`Alt` + :kbd:`↑` recalls individual arguments, starting from the last argument in the last executed line. A single press replaces "!$", later presses replace "!!:4" and such. An alternate key binding is :kbd:`Alt` + :kbd:`.`.
|
||||
- :kbd:`Alt`\ +\ :kbd:`↑` recalls individual arguments, starting from the last argument in the last executed line. A single press replaces "!$", later presses replace "!!:4" and such. An alternate key binding is :kbd:`Alt`\ +\ :kbd:`.`.
|
||||
|
||||
- If the argument you want is far back in history (e.g. 2 lines back - that's a lot of words!), type any part of it and then press :kbd:`Alt` + :kbd:`↑`. This will show only arguments containing that part and you will get what you want much faster. Try it out, this is very convenient!
|
||||
- If the argument you want is far back in history (e.g. 2 lines back - that's a lot of words!), type any part of it and then press :kbd:`Alt`\ +\ :kbd:`↑`. This will show only arguments containing that part and you will get what you want much faster. Try it out, this is very convenient!
|
||||
|
||||
- If you want to reuse several arguments from the same line ("!!:3*" and the like), consider recalling the whole line and removing what you don't need (:kbd:`Alt` + :kbd:`D` and :kbd:`Alt` + :kbd:`Backspace` are your friends).
|
||||
- If you want to reuse several arguments from the same line ("!!:3*" and the like), consider recalling the whole line and removing what you don't need (:kbd:`Alt`\ +\ :kbd:`D` and :kbd:`Alt`\ +\ :kbd:`Backspace` are your friends).
|
||||
|
||||
See :ref:`documentation <editor>` for more details about line editing in fish.
|
||||
|
||||
|
|
|
@ -323,7 +323,7 @@ will start the emacs text editor in the background.
|
|||
Job control
|
||||
-----------
|
||||
|
||||
Most programs allow you to suspend the program's execution and return control to ``fish`` by pressing :kbd:`Control` + :kbd:`Z` (also referred to as ``^Z``). Once back at the ``fish`` commandline, you can start other programs and do anything you want. If you then want you can go back to the suspended command by using the :ref:`fg <cmd-fg>` (foreground) command.
|
||||
Most programs allow you to suspend the program's execution and return control to ``fish`` by pressing :kbd:`Control`\ +\ :kbd:`Z` (also referred to as ``^Z``). Once back at the ``fish`` commandline, you can start other programs and do anything you want. If you then want you can go back to the suspended command by using the :ref:`fg <cmd-fg>` (foreground) command.
|
||||
|
||||
If you instead want to put a suspended job into the background, use the :ref:`bg <cmd-bg>` command.
|
||||
|
||||
|
@ -1224,7 +1224,7 @@ Autosuggestions
|
|||
|
||||
fish suggests commands as you type, based on `command history <#history-search>`_, completions, and valid file paths. As you type commands, you will see a suggestion offered after the cursor, in a muted gray color (which can be changed with the ``fish_color_autosuggestion`` variable).
|
||||
|
||||
To accept the autosuggestion (replacing the command line contents), press :kbd:`→` or :kbd:`Control` + :kbd:`F`. To accept the first suggested word, press :kbd:`Alt` + :kbd:`→` or :kbd:`Alt` + :kbd:`F`. If the autosuggestion is not what you want, just ignore it: it won't execute unless you accept it.
|
||||
To accept the autosuggestion (replacing the command line contents), press :kbd:`→` or :kbd:`Control`\ +\ :kbd:`F`. To accept the first suggested word, press :kbd:`Alt`\ +\ :kbd:`→` or :kbd:`Alt`\ +\ :kbd:`F`. If the autosuggestion is not what you want, just ignore it: it won't execute unless you accept it.
|
||||
|
||||
Autosuggestions are a powerful way to quickly summon frequently entered commands, by typing the first few characters. They are also an efficient technique for navigating through directory hierarchies.
|
||||
|
||||
|
@ -1287,76 +1287,76 @@ Shared bindings
|
|||
|
||||
Some bindings are shared between emacs- and vi-mode because they aren't text editing bindings or because what Vi/Vim does for a particular key doesn't make sense for a shell.
|
||||
|
||||
- :kbd:`Tab` `completes <#tab-completion>`_ the current token. :kbd:`Shift` + :kbd:`Tab` completes the current token and starts the pager's search mode.
|
||||
- :kbd:`Tab` `completes <#tab-completion>`_ the current token. :kbd:`Shift`\ +\ :kbd:`Tab` completes the current token and starts the pager's search mode.
|
||||
|
||||
- :kbd:`←` (Left) and :kbd:`→` (Right) move the cursor left or right by one character. If the cursor is already at the end of the line, and an autosuggestion is available, they accept one word of the autosuggestion.
|
||||
|
||||
- :kbd:`Alt` + :kbd:`←` and :kbd:`Alt` + :kbd:`→` move the cursor one word left or right (to the next space or punctuation mark), or moves forward/backward in the directory history if the command line is empty. If the cursor is already at the end of the line, and an autosuggestion is available, :kbd:`Alt` + :kbd:`→` (or :kbd:`Alt` + :kbd:`F`) accepts the first word in the suggestion.
|
||||
- :kbd:`Alt`\ +\ :kbd:`←` and :kbd:`Alt`\ +\ :kbd:`→` move the cursor one word left or right (to the next space or punctuation mark), or moves forward/backward in the directory history if the command line is empty. If the cursor is already at the end of the line, and an autosuggestion is available, :kbd:`Alt`\ +\ :kbd:`→` (or :kbd:`Alt`\ +\ :kbd:`F`) accepts the first word in the suggestion.
|
||||
|
||||
- :kbd:`Control` + :kbd:`←` and :kbd:`Control` + :kbd:`→` move the cursor one word left or right. These accept one word of the autosuggestion - the part they'd move over.
|
||||
- :kbd:`Control`\ +\ :kbd:`←` and :kbd:`Control`\ +\ :kbd:`→` move the cursor one word left or right. These accept one word of the autosuggestion - the part they'd move over.
|
||||
|
||||
- :kbd:`Shift` + :kbd:`←` and :kbd:`Shift` + :kbd:`→` move the cursor one word left or right, without stopping on punctuation. These accept one big word of the autosuggestion.
|
||||
- :kbd:`Shift`\ +\ :kbd:`←` and :kbd:`Shift`\ +\ :kbd:`→` move the cursor one word left or right, without stopping on punctuation. These accept one big word of the autosuggestion.
|
||||
|
||||
- :kbd:`↑` (Up) and :kbd:`↓` (Down) (or :kbd:`Control` + :kbd:`P` and :kbd:`Control` + :kbd:`N` for emacs aficionados) search the command history for the previous/next command containing the string that was specified on the commandline before the search was started. If the commandline was empty when the search started, all commands match. See the `history <#history-search>`_ section for more information on history searching.
|
||||
- :kbd:`↑` (Up) and :kbd:`↓` (Down) (or :kbd:`Control`\ +\ :kbd:`P` and :kbd:`Control`\ +\ :kbd:`N` for emacs aficionados) search the command history for the previous/next command containing the string that was specified on the commandline before the search was started. If the commandline was empty when the search started, all commands match. See the `history <#history-search>`_ section for more information on history searching.
|
||||
|
||||
- :kbd:`Alt` + :kbd:`↑` and :kbd:`Alt` + :kbd:`↓` search the command history for the previous/next token containing the token under the cursor before the search was started. If the commandline was not on a token when the search started, all tokens match. See the `history <#history-search>`_ section for more information on history searching.
|
||||
- :kbd:`Alt`\ +\ :kbd:`↑` and :kbd:`Alt`\ +\ :kbd:`↓` search the command history for the previous/next token containing the token under the cursor before the search was started. If the commandline was not on a token when the search started, all tokens match. See the `history <#history-search>`_ section for more information on history searching.
|
||||
|
||||
- :kbd:`Control` + :kbd:`C` cancels the entire line.
|
||||
- :kbd:`Control`\ +\ :kbd:`C` cancels the entire line.
|
||||
|
||||
- :kbd:`Control` + :kbd:`D` delete one character to the right of the cursor. If the command line is empty, :kbd:`Control` + :kbd:`D` will exit fish.
|
||||
- :kbd:`Control`\ +\ :kbd:`D` delete one character to the right of the cursor. If the command line is empty, :kbd:`Control`\ +\ :kbd:`D` will exit fish.
|
||||
|
||||
- :kbd:`Control` + :kbd:`U` moves contents from the beginning of line to the cursor to the `killring <#killring>`__.
|
||||
- :kbd:`Control`\ +\ :kbd:`U` moves contents from the beginning of line to the cursor to the `killring <#killring>`__.
|
||||
|
||||
- :kbd:`Control` + :kbd:`L` clears and repaints the screen.
|
||||
- :kbd:`Control`\ +\ :kbd:`L` clears and repaints the screen.
|
||||
|
||||
- :kbd:`Control` + :kbd:`W` moves the previous path component (everything up to the previous "/", ":" or "@") to the `killring <#killring>`__.
|
||||
- :kbd:`Control`\ +\ :kbd:`W` moves the previous path component (everything up to the previous "/", ":" or "@") to the `killring <#killring>`__.
|
||||
|
||||
- :kbd:`Control` + :kbd:`X` copies the current buffer to the system's clipboard, :kbd:`Control` + :kbd:`V` inserts the clipboard contents.
|
||||
- :kbd:`Control`\ +\ :kbd:`X` copies the current buffer to the system's clipboard, :kbd:`Control`\ +\ :kbd:`V` inserts the clipboard contents.
|
||||
|
||||
- :kbd:`Alt` + :kbd:`D` moves the next word to the `killring <#killring>`__.
|
||||
- :kbd:`Alt`\ +\ :kbd:`D` moves the next word to the `killring <#killring>`__.
|
||||
|
||||
- :kbd:`Alt` + :kbd:`H` (or :kbd:`F1`) shows the manual page for the current command, if one exists.
|
||||
- :kbd:`Alt`\ +\ :kbd:`H` (or :kbd:`F1`) shows the manual page for the current command, if one exists.
|
||||
|
||||
- :kbd:`Alt` + :kbd:`L` lists the contents of the current directory, unless the cursor is over a directory argument, in which case the contents of that directory will be listed.
|
||||
- :kbd:`Alt`\ +\ :kbd:`L` lists the contents of the current directory, unless the cursor is over a directory argument, in which case the contents of that directory will be listed.
|
||||
|
||||
- :kbd:`Alt` + :kbd:`P` adds the string '``| less;``' to the end of the job under the cursor. The result is that the output of the command will be paged.
|
||||
- :kbd:`Alt`\ +\ :kbd:`P` adds the string '``| less;``' to the end of the job under the cursor. The result is that the output of the command will be paged.
|
||||
|
||||
- :kbd:`Alt` + :kbd:`W` prints a short description of the command under the cursor.
|
||||
- :kbd:`Alt`\ +\ :kbd:`W` prints a short description of the command under the cursor.
|
||||
|
||||
- :kbd:`Alt` + :kbd:`E` edit the current command line in an external editor. The editor is chosen from the first available of the ``$VISUAL`` or ``$EDITOR`` variables.
|
||||
- :kbd:`Alt`\ +\ :kbd:`E` edit the current command line in an external editor. The editor is chosen from the first available of the ``$VISUAL`` or ``$EDITOR`` variables.
|
||||
|
||||
- :kbd:`Alt` + :kbd:`V` Same as :kbd:`Alt` + :kbd:`E`.
|
||||
- :kbd:`Alt`\ +\ :kbd:`V` Same as :kbd:`Alt`\ +\ :kbd:`E`.
|
||||
|
||||
- :kbd:`Alt` + :kbd:`S` Prepends `sudo` to the current commandline.
|
||||
- :kbd:`Alt`\ +\ :kbd:`S` Prepends `sudo` to the current commandline.
|
||||
|
||||
.. _emacs-mode:
|
||||
|
||||
Emacs mode commands
|
||||
-------------------
|
||||
|
||||
- :kbd:`Home` or :kbd:`Control` + :kbd:`A` moves the cursor to the beginning of the line.
|
||||
- :kbd:`Home` or :kbd:`Control`\ +\ :kbd:`A` moves the cursor to the beginning of the line.
|
||||
|
||||
- :kbd:`End` or :kbd:`Control` + :kbd:`E` moves to the end of line. If the cursor is already at the end of the line, and an autosuggestion is available, :kbd:`End` or :kbd:`Control` + :kbd:`E` accepts the autosuggestion.
|
||||
- :kbd:`End` or :kbd:`Control`\ +\ :kbd:`E` moves to the end of line. If the cursor is already at the end of the line, and an autosuggestion is available, :kbd:`End` or :kbd:`Control`\ +\ :kbd:`E` accepts the autosuggestion.
|
||||
|
||||
- :kbd:`Control` + :kbd:`B`, :kbd:`Control` + :kbd:`F` move the cursor one character left or right just like the :kbd:`←` (Left) and :kbd:`→` (Right) shared bindings (which are available as well).
|
||||
- :kbd:`Control`\ +\ :kbd:`B`, :kbd:`Control`\ +\ :kbd:`F` move the cursor one character left or right just like the :kbd:`←` (Left) and :kbd:`→` (Right) shared bindings (which are available as well).
|
||||
|
||||
- :kbd:`Control` + :kbd:`N`, :kbd:`Control` + :kbd:`P` move the cursor up/down or through history, like the up and down arrow shared bindings.
|
||||
- :kbd:`Control`\ +\ :kbd:`N`, :kbd:`Control`\ +\ :kbd:`P` move the cursor up/down or through history, like the up and down arrow shared bindings.
|
||||
|
||||
- :kbd:`Delete` and :kbd:`Backspace` removes one character forwards or backwards respectively.
|
||||
|
||||
- :kbd:`Control` + :kbd:`K` moves contents from the cursor to the end of line to the `killring <#killring>`__.
|
||||
- :kbd:`Control`\ +\ :kbd:`K` moves contents from the cursor to the end of line to the `killring <#killring>`__.
|
||||
|
||||
- :kbd:`Alt` + :kbd:`C` capitalizes the current word.
|
||||
- :kbd:`Alt`\ +\ :kbd:`C` capitalizes the current word.
|
||||
|
||||
- :kbd:`Alt` + :kbd:`U` makes the current word uppercase.
|
||||
- :kbd:`Alt`\ +\ :kbd:`U` makes the current word uppercase.
|
||||
|
||||
- :kbd:`Control` + :kbd:`T` transposes the last two characters
|
||||
- :kbd:`Control`\ +\ :kbd:`T` transposes the last two characters
|
||||
|
||||
- :kbd:`Alt` + :kbd:`T` transposes the last two words
|
||||
- :kbd:`Alt`\ +\ :kbd:`T` transposes the last two words
|
||||
|
||||
- :kbd:`Control` + :kbd:`_` (:kbd:`Control` + :kbd:`/` on some terminals) undoes the most recent edit of the line
|
||||
- :kbd:`Control`\ +\ :kbd:`_` (:kbd:`Control`\ +\ :kbd:`/` on some terminals) undoes the most recent edit of the line
|
||||
|
||||
- :kbd:`Alt` + :kbd:`/` reverts the most recent undo
|
||||
- :kbd:`Alt`\ +\ :kbd:`/` reverts the most recent undo
|
||||
|
||||
|
||||
You can change these key bindings using the :ref:`bind <cmd-bind>` builtin.
|
||||
|
@ -1418,13 +1418,13 @@ Command mode is also known as normal mode.
|
|||
|
||||
- :kbd:`A` enters `insert mode <#vi-mode-insert>`_ after the current cursor position.
|
||||
|
||||
- :kbd:`Shift` + :kbd:`A` enters `insert mode <#vi-mode-insert>`_ at the end of the line.
|
||||
- :kbd:`Shift`\ +\ :kbd:`A` enters `insert mode <#vi-mode-insert>`_ at the end of the line.
|
||||
|
||||
- :kbd:`0` (zero) moves the cursor to beginning of line (remaining in command mode).
|
||||
|
||||
- :kbd:`D` + :kbd:`D` deletes the current line and moves it to the `killring <#killring>`__.
|
||||
- :kbd:`D`\ +\ :kbd:`D` deletes the current line and moves it to the `killring <#killring>`__.
|
||||
|
||||
- :kbd:`Shift` + :kbd:`D` deletes text after the current cursor position and moves it to the `killring <#killring>`__.
|
||||
- :kbd:`Shift`\ +\ :kbd:`D` deletes text after the current cursor position and moves it to the `killring <#killring>`__.
|
||||
|
||||
- :kbd:`P` pastes text from the `killring <#killring>`__.
|
||||
|
||||
|
@ -1454,16 +1454,16 @@ Visual mode
|
|||
|
||||
- :kbd:`D` and :kbd:`X` move the selection to the `killring <#killring>`__ and enter `command mode <#vi-mode-command>`__.
|
||||
|
||||
- :kbd:`Escape` and :kbd:`Control` + :kbd:`C` enter `command mode <#vi-mode-command>`_.
|
||||
- :kbd:`Escape` and :kbd:`Control`\ +\ :kbd:`C` enter `command mode <#vi-mode-command>`_.
|
||||
|
||||
.. _killring:
|
||||
|
||||
Copy and paste (Kill Ring)
|
||||
--------------------------
|
||||
|
||||
``fish`` uses an Emacs-style kill ring for copy and paste functionality. For example, use :kbd:`Control` + :kbd:`K` (`kill-line`) to cut from the current cursor position to the end of the line. The string that is cut (a.k.a. killed in emacs-ese) is inserted into a list of kills, called the kill ring. To paste the latest value from the kill ring (emacs calls this "yanking") use :kbd:`Control` + :kbd:`Y` (the `yank` input function). After pasting, use :kbd:`Alt` + :kbd:`Y` (`yank-pop`) to rotate to the previous kill.
|
||||
``fish`` uses an Emacs-style kill ring for copy and paste functionality. For example, use :kbd:`Control`\ +\ :kbd:`K` (`kill-line`) to cut from the current cursor position to the end of the line. The string that is cut (a.k.a. killed in emacs-ese) is inserted into a list of kills, called the kill ring. To paste the latest value from the kill ring (emacs calls this "yanking") use :kbd:`Control`\ +\ :kbd:`Y` (the `yank` input function). After pasting, use :kbd:`Alt`\ +\ :kbd:`Y` (`yank-pop`) to rotate to the previous kill.
|
||||
|
||||
Copy and paste from outside are also supported, both via the :kbd:`Control` + :kbd:`X` / :kbd:`Control` + :kbd:`V` bindings (the `fish_clipboard_copy` and `fish_clipboard_paste` functions [#]_) and via the terminal's paste function, for which fish enables "Bracketed Paste Mode", so it can tell a paste from manually entered text.
|
||||
Copy and paste from outside are also supported, both via the :kbd:`Control`\ +\ :kbd:`X` / :kbd:`Control`\ +\ :kbd:`V` bindings (the `fish_clipboard_copy` and `fish_clipboard_paste` functions [#]_) and via the terminal's paste function, for which fish enables "Bracketed Paste Mode", so it can tell a paste from manually entered text.
|
||||
In addition, when pasting inside single quotes, pasted single quotes and backslashes are automatically escaped so that the result can be used as a single token simply by closing the quote after.
|
||||
|
||||
.. [#] These rely on external tools. Currently xsel, xclip, wl-copy/wl-paste and pbcopy/pbpaste are supported.
|
||||
|
@ -1475,7 +1475,7 @@ Searchable history
|
|||
|
||||
After a command has been entered, it is inserted at the end of a history list. Any duplicate history items are automatically removed. By pressing the up and down keys, the user can search forwards and backwards in the history. If the current command line is not empty when starting a history search, only the commands containing the string entered into the command line are shown.
|
||||
|
||||
By pressing :kbd:`Alt` + :kbd:`↑` and :kbd:`Alt` + :kbd:`↓`, a history search is also performed, but instead of searching for a complete commandline, each commandline is broken into separate elements just like it would be before execution, and the history is searched for an element matching that under the cursor.
|
||||
By pressing :kbd:`Alt`\ +\ :kbd:`↑` and :kbd:`Alt`\ +\ :kbd:`↓`, a history search is also performed, but instead of searching for a complete commandline, each commandline is broken into separate elements just like it would be before execution, and the history is searched for an element matching that under the cursor.
|
||||
|
||||
History searches can be aborted by pressing the escape key.
|
||||
|
||||
|
@ -1492,7 +1492,7 @@ Examples:
|
|||
|
||||
To search for previous entries containing the word 'make', type ``make`` in the console and press the up key.
|
||||
|
||||
If the commandline reads ``cd m``, place the cursor over the ``m`` character and press :kbd:`Alt` + :kbd:`↑` to search for previously typed words containing 'm'.
|
||||
If the commandline reads ``cd m``, place the cursor over the ``m`` character and press :kbd:`Alt`\ +\ :kbd:`↑` to search for previously typed words containing 'm'.
|
||||
|
||||
|
||||
.. _multiline:
|
||||
|
@ -1504,7 +1504,7 @@ The fish commandline editor can be used to work on commands that are several lin
|
|||
|
||||
- Pressing the :kbd:`Enter` key while a block of commands is unclosed, such as when one or more block commands such as ``for``, ``begin`` or ``if`` do not have a corresponding ``end`` command.
|
||||
|
||||
- Pressing :kbd:`Alt` + :kbd:`Enter` instead of pressing the :kbd:`Enter` key.
|
||||
- Pressing :kbd:`Alt`\ +\ :kbd:`Enter` instead of pressing the :kbd:`Enter` key.
|
||||
|
||||
- By inserting a backslash (``\``) character before pressing the :kbd:`Enter` key, escaping the newline.
|
||||
|
||||
|
@ -1519,7 +1519,7 @@ Normally when ``fish`` starts a program, this program will be put in the foregro
|
|||
|
||||
- By ending a command with the ``&`` (ampersand) symbol, the user tells ``fish`` to put the specified command into the background. A background process will be run simultaneous with ``fish``. ``fish`` will retain control of the terminal, so the program will not be able to read from the keyboard.
|
||||
|
||||
- By pressing :kbd:`Control` + :kbd:`Z`, the user stops a currently running foreground program and returns control to ``fish``. Some programs do not support this feature, or remap it to another key. GNU Emacs uses :kbd:`Control` + :kbd:`X` :kbd:`Z` to stop running.
|
||||
- By pressing :kbd:`Control`\ +\ :kbd:`Z`, the user stops a currently running foreground program and returns control to ``fish``. Some programs do not support this feature, or remap it to another key. GNU Emacs uses :kbd:`Control`\ +\ :kbd:`X` :kbd:`Z` to stop running.
|
||||
|
||||
- By using the :ref:`bg <cmd-bg>` and :ref:`fg <cmd-fg>` builtin commands, the user can send any currently running job into the foreground or background.
|
||||
|
||||
|
@ -1707,7 +1707,7 @@ For more information on how to define new event handlers, see the documentation
|
|||
Debugging fish scripts
|
||||
-----------------------
|
||||
|
||||
Fish includes a built in debugging facility. The debugger allows you to stop execution of a script at an arbitrary point. When this happens you are presented with an interactive prompt. At this prompt you can execute any fish command (there are no debug commands as such). For example, you can check or change the value of any variables using ``printf`` and ``set``. As another example, you can run ``status print-stack-trace`` to see how this breakpoint was reached. To resume normal execution of the script, simply type ``exit`` or :kbd:`Control` + :kbd:`D`.
|
||||
Fish includes a built in debugging facility. The debugger allows you to stop execution of a script at an arbitrary point. When this happens you are presented with an interactive prompt. At this prompt you can execute any fish command (there are no debug commands as such). For example, you can check or change the value of any variables using ``printf`` and ``set``. As another example, you can run ``status print-stack-trace`` to see how this breakpoint was reached. To resume normal execution of the script, simply type ``exit`` or :kbd:`Control`\ +\ :kbd:`D`.
|
||||
|
||||
To start a debug session simply run the builtin command ``breakpoint`` at the point in a function or script where you wish to gain control. Also, the default action of the TRAP signal is to call this builtin. So a running script can be debugged by sending it the TRAP signal with the ``kill`` command. Once in the debugger, it is easy to insert new breakpoints by using the funced function to edit the definition of a function.
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ Especially powerful is the recursive wildcard ** which searches directories recu
|
|||
/var/run/sntp.log
|
||||
|
||||
|
||||
If that directory traversal is taking a long time, you can :kbd:`Control` + :kbd:`C` out of it.
|
||||
If that directory traversal is taking a long time, you can :kbd:`Control`\ +\ :kbd:`C` out of it.
|
||||
|
||||
|
||||
Pipes and Redirections
|
||||
|
@ -175,7 +175,7 @@ And history too. Type a command once, and you can re-summon it by just typing a
|
|||
> :red:`r`:gray:`sync -avze ssh . myname@somelonghost.com:/some/long/path/doo/dee/doo/dee/doo`
|
||||
|
||||
|
||||
To accept the autosuggestion, hit :kbd:`→` (right arrow) or :kbd:`Control` + :kbd:`F`. To accept a single word of the autosuggestion, :kbd:`Alt` + :kbd:`→` (right arrow). If the autosuggestion is not what you want, just ignore it.
|
||||
To accept the autosuggestion, hit :kbd:`→` (right arrow) or :kbd:`Control`\ +\ :kbd:`F`. To accept a single word of the autosuggestion, :kbd:`Alt`\ +\ :kbd:`→` (right arrow). If the autosuggestion is not what you want, just ignore it.
|
||||
|
||||
Tab Completions
|
||||
---------------
|
||||
|
|
Loading…
Reference in a new issue