docs: Replace &.arr; markup with unicode arrows

This is still missing the @cursor_keys bit.

See #5696.

[ci skip]
This commit is contained in:
Fabian Homborg 2019-03-24 20:03:29 +01:00
parent 848d538f08
commit 99d77c6049
3 changed files with 18 additions and 18 deletions

View file

@ -31,7 +31,7 @@ You can also use the Web configuration tool, <a href="commands.html#fish_config"
How do I run a command from history? How do I run a command from history?
------------------------------------ ------------------------------------
Type some part of the command, and then hit the @cursor_key{&uarr;,up} or @cursor_key{&darr;,down} arrow keys to navigate through history matches. Type some part of the command, and then hit the :kbd:`↑` (up) or :kbd:`↓` (down) arrow keys to navigate through history matches.
How do I run a subcommand? The backtick doesn't work! How do I run a subcommand? The backtick doesn't work!
@ -231,13 +231,13 @@ Because history substitution is an awkward interface that was invented before in
Fish history recall is very simple yet effective: Fish history recall is very simple yet effective:
- As in any modern shell, the Up arrow, @cursor_key{&uarr;,Up} recalls whole lines, starting from the last line executed. A single press replaces "!!", later presses replace "!-3" and the like. - As in any modern shell, the Up arrow, :kbd:`↑` recalls whole lines, starting from the last line executed. A single press replaces "!!", later presses replace "!-3" and the like.
- 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 constrain the recall to lines that include this text, and you will get to the line you want much faster. This replaces "!vi", "!?bar.c" and the like. - 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 constrain the recall to lines 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+&uarr;,Up` recalls individual arguments, starting from the last argument in the last line executed. A single press replaces "!$", later presses replace "!!:4" and the like. - :kbd:`Alt+,Up` recalls individual arguments, starting from the last argument in the last line executed. A single press replaces "!$", later presses replace "!!:4" and the like.
- 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+&uarr;,Up`. 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+,Up`. 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+D` and :kbd:`Alt+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+D` and :kbd:`Alt+Backspace` are your friends).

View file

@ -92,7 +92,7 @@ Commands versus Programs
**Programs** in other languages can often be regarded as black boxes: they get complex input and return complex output. Sometimes they produce side effects such as writing to a file or reporting an error, but the emphasis is on: arguments in and return values out: **Programs** in other languages can often be regarded as black boxes: they get complex input and return complex output. Sometimes they produce side effects such as writing to a file or reporting an error, but the emphasis is on: arguments in and return values out:
Arguments &rarr; |Program| &rarr; Return Values Arguments → |Program| → Return Values
**Shell commands** are different: **Shell commands** are different:
@ -102,7 +102,7 @@ Arguments &rarr; |Program| &rarr; Return Values
<table with=100%> <table with=100%>
<tr><td>Input Stream &rArr;<td rowspan="2">|Shell Command|<td>&rArr; Output Stream <tr><td>Input Stream &rArr;<td rowspan="2">|Shell Command|<td>&rArr; Output Stream
<tr><td>switch and data as arguments &rarr;<td>&rarr; exit code <tr><td>switch and data as arguments →<td>→ exit code
</table> </table>
This leads to another way of programming and especially of combining commands: This leads to another way of programming and especially of combining commands:
@ -518,7 +518,7 @@ Autosuggestions
fish suggests commands as you type, based on command history, 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). fish suggests commands as you type, based on command history, 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 right arrow or :kbd:`Control+F`. To accept the first suggested word, press :kbd:`Alt+&rarr;,Right` or :kbd:`Alt+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 right arrow or :kbd:`Control+F`. To accept the first suggested word, press :kbd:`Alt+,Right` or :kbd:`Alt+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. 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.
@ -1354,13 +1354,13 @@ Some bindings are shared between emacs- and vi-mode because they aren't text edi
- :kbd:`Tab` `completes <#completion>`_ the current token. :kbd:`Shift, Tab` completes the current token and starts the pager's search mode. - :kbd:`Tab` `completes <#completion>`_ the current token. :kbd:`Shift, Tab` completes the current token and starts the pager's search mode.
- :kbd:`Alt+&larr;,Left` and :kbd:`Alt+&rarr;,Right` 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+&rarr;,Right` (or :kbd:`Alt+F`) accepts the first word in the suggestion. - :kbd:`Alt+←,Left` and :kbd:`Alt+→,Right` 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+,Right` (or :kbd:`Alt+F`) accepts the first word in the suggestion.
- :kbd:`Shift,&larr;,Left` and :kbd:`Shift,&rarr;,Right` move the cursor one word left or right, without stopping on punctuation. - :kbd:`Shift,←,Left` and :kbd:`Shift,→,Right` move the cursor one word left or right, without stopping on punctuation.
- @cursor_key{&uarr;,Up} and @cursor_key{&darr;,Down} (or :kbd:`Control+P` and :kbd:`Control+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>`_ section for more information on history searching. - @cursor_key{↑,Up} and @cursor_key{↓,Down} (or :kbd:`Control+P` and :kbd:`Control+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>`_ section for more information on history searching.
- :kbd:`Alt+&uarr;,Up` and :kbd:`Alt+&darr;,Down` 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>`_ section for more information on history searching. - :kbd:`Alt+↑,Up` and :kbd:`Alt+↓,Down` 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>`_ section for more information on history searching.
- :kbd:`Control+C` cancels the entire line. - :kbd:`Control+C` cancels the entire line.
@ -1397,7 +1397,7 @@ Emacs mode commands
- :kbd:`End` or :kbd:`Control+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+E` accepts the autosuggestion. - :kbd:`End` or :kbd:`Control+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+E` accepts the autosuggestion.
- @cursor_key{&larr;,Left} (or :kbd:`Control+B`) and @cursor_key{&rarr;,Right} (or :kbd:`Control+F`) 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, the @cursor_key{&rarr;,Right} key and the :kbd:`Control+F` combination accept the suggestion. - @cursor_key{←,Left} (or :kbd:`Control+B`) and @cursor_key{→,Right} (or :kbd:`Control+F`) 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, the @cursor_key{,Right} key and the :kbd:`Control+F` combination accept the suggestion.
- :kbd:`Delete` and :kbd:`Backspace` removes one character forwards or backwards respectively. - :kbd:`Delete` and :kbd:`Backspace` removes one character forwards or backwards respectively.
@ -1484,7 +1484,7 @@ Insert mode
Visual mode Visual mode
----------- -----------
- @cursor_key{&larr;,Left} and @cursor_key{&rarr;,Right} extend the selection backward/forward by one character. - @cursor_key{←,Left} and @cursor_key{→,Right} extend the selection backward/forward by one character.
- :kbd:`b` and :kbd:`w` extend the selection backward/forward by one word. - :kbd:`b` and :kbd:`w` extend the selection backward/forward by one word.
@ -1508,7 +1508,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. 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+&uarr;,Up` and :kbd:`Alt+&darr;,Down`, 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+↑,Up` and :kbd:`Alt+↓,Down`, 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. History searches can be aborted by pressing the escape key.
@ -1523,7 +1523,7 @@ Examples:
To search for previous entries containing the word 'make', type ``make`` in the console and press the up key. 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+&uarr;,Up` 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+,Up` to search for previously typed words containing 'm'.
.. _multiline: .. _multiline:

View file

@ -163,7 +163,7 @@ And history too. Type a command once, and you can re-summon it by just typing a
>_ <eror>r<</eror><s>___sync -avze ssh . myname@somelonghost.com:/some/long/path/doo/dee/doo/dee/doo</s> >_ <eror>r<</eror><s>___sync -avze ssh . myname@somelonghost.com:/some/long/path/doo/dee/doo/dee/doo</s>
To accept the autosuggestion, hit @cursor_key{&rarr;,right arrow} or :kbd:`Control+F`. To accept a single word of the autosuggestion, :kbd:`Alt+&rarr;` (right arrow). If the autosuggestion is not what you want, just ignore it. To accept the autosuggestion, hit @cursor_key{,right arrow} or :kbd:`Control+F`. To accept a single word of the autosuggestion, :kbd:`Alt+` (right arrow). If the autosuggestion is not what you want, just ignore it.
Tab Completions Tab Completions
--------------- ---------------
@ -172,7 +172,7 @@ Tab Completions
Press :kbd:`Tab`, and ``fish`` will attempt to complete the command, argument, or path:: Press :kbd:`Tab`, and ``fish`` will attempt to complete the command, argument, or path::
>_ <eror>/pri</eror> :kbd:`Tab` &rarr; /private/ >_ <eror>/pri</eror> :kbd:`Tab` /private/
If there's more than one possibility, it will list them:: If there's more than one possibility, it will list them::
@ -185,7 +185,7 @@ Hit tab again to cycle through the possibilities.
``fish`` can also complete many commands, like git branches:: ``fish`` can also complete many commands, like git branches::
>_ git merge pr :kbd:`Tab` &rarr; git merge prompt_designer >_ git merge pr :kbd:`Tab` git merge prompt_designer
>_ git checkout b :kbd:`Tab` >_ git checkout b :kbd:`Tab`
<outp><mtch>b</outp>uiltin_list_io_merge <i>(Branch)</i> \mtch{b</mtch>uiltin_set_color <i>(Branch)</i> <mtch>b</mtch>usted_events <i>(Tag)</i>} <outp><mtch>b</outp>uiltin_list_io_merge <i>(Branch)</i> \mtch{b</mtch>uiltin_set_color <i>(Branch)</i> <mtch>b</mtch>usted_events <i>(Tag)</i>}