mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 06:13:20 +00:00
More documentation work
This commit is contained in:
parent
79d1b3e085
commit
3b629d29aa
6 changed files with 41 additions and 46 deletions
|
@ -45,39 +45,39 @@ Options
|
||||||
-------
|
-------
|
||||||
The following options are available:
|
The following options are available:
|
||||||
|
|
||||||
``-k`` or ``--key``
|
**-k** or **--key**
|
||||||
Specify a key name, such as 'left' or 'backspace' instead of a character sequence
|
Specify a key name, such as 'left' or 'backspace' instead of a character sequence
|
||||||
|
|
||||||
``-K`` or ``--key-names``
|
**-K** or **--key-names**
|
||||||
Display a list of available key names. Specifying ``-a`` or ``--all`` includes keys that don't have a known mapping
|
Display a list of available key names. Specifying **-a** or **--all** includes keys that don't have a known mapping
|
||||||
|
|
||||||
``-f`` or ``--function-names``
|
**-f** or **--function-names**
|
||||||
Display a list of available input functions
|
Display a list of available input functions
|
||||||
|
|
||||||
``-L`` or ``--list-modes``
|
**-L** or **--list-modes**
|
||||||
Display a list of defined bind modes
|
Display a list of defined bind modes
|
||||||
|
|
||||||
``-M MODE`` or ``--mode MODE``
|
**-M MODE** or **--mode** *MODE*
|
||||||
Specify a bind mode that the bind is used in. Defaults to "default"
|
Specify a bind mode that the bind is used in. Defaults to "default"
|
||||||
|
|
||||||
``-m NEW_MODE`` or ``--sets-mode NEW_MODE``
|
**-m NEW_MODE** or **--sets-mode** *NEW_MODE*
|
||||||
Change the current mode to ``NEW_MODE`` after this binding is executed
|
Change the current mode to *NEW_MODE* after this binding is executed
|
||||||
|
|
||||||
``-e`` or ``--erase``
|
**-e** or **--erase**
|
||||||
Erase the binding with the given sequence and mode instead of defining a new one.
|
Erase the binding with the given sequence and mode instead of defining a new one.
|
||||||
Multiple sequences can be specified with this flag.
|
Multiple sequences can be specified with this flag.
|
||||||
Specifying ``-a`` or ``--all`` with ``-M`` or ``--mode`` erases all binds in the given mode regardless of sequence.
|
Specifying **-a** or **--all** with **-M** or **--mode** erases all binds in the given mode regardless of sequence.
|
||||||
Specifying ``-a`` or ``--all`` without ``-M`` or ``--mode`` erases all binds in all modes regardless of sequence.
|
Specifying **-a** or **--all** without **-M** or **--mode** erases all binds in all modes regardless of sequence.
|
||||||
|
|
||||||
``-a`` or ``--all``
|
**-a** or **--all**
|
||||||
See ``--erase`` and ``--key-names``
|
See **--erase** and **--key-names**
|
||||||
|
|
||||||
``--preset`` and ``--user``
|
**--preset** and **--user**
|
||||||
Specify if bind should operate on user or preset bindings.
|
Specify if bind should operate on user or preset bindings.
|
||||||
User bindings take precedence over preset bindings when fish looks up mappings.
|
User bindings take precedence over preset bindings when fish looks up mappings.
|
||||||
By default, all ``bind`` invocations work on the "user" level except for listing, which will show both levels.
|
By default, all ``bind`` invocations work on the "user" level except for listing, which will show both levels.
|
||||||
All invocations except for inserting new bindings can operate on both levels at the same time (if both ``--preset`` and ``--user`` are given).
|
All invocations except for inserting new bindings can operate on both levels at the same time (if both **--preset** and **--user** are given).
|
||||||
``--preset`` should only be used in full binding sets (like when working on ``fish_vi_key_bindings``).
|
**--preset** should only be used in full binding sets (like when working on ``fish_vi_key_bindings``).
|
||||||
|
|
||||||
Special input functions
|
Special input functions
|
||||||
-----------------------
|
-----------------------
|
||||||
|
@ -292,7 +292,7 @@ The following functions are included as normal functions, but are particularly u
|
||||||
move the cursor or search the history depending on the cursor position and current mode
|
move the cursor or search the history depending on the cursor position and current mode
|
||||||
|
|
||||||
``edit_command_buffer``
|
``edit_command_buffer``
|
||||||
open the visual editor (controlled by the ``VISUAL`` or ``EDITOR`` environment variables) with the current command-line contents
|
open the visual editor (controlled by the :envvar:`VISUAL` or :envvar:`EDITOR` environment variables) with the current command-line contents
|
||||||
|
|
||||||
``delete-or-exit``
|
``delete-or-exit``
|
||||||
quit the shell if the current command-line is empty, or delete the character under the cursor if not
|
quit the shell if the current command-line is empty, or delete the character under the cursor if not
|
||||||
|
|
|
@ -6,9 +6,7 @@ block - temporarily block delivery of events
|
||||||
Synopsis
|
Synopsis
|
||||||
--------
|
--------
|
||||||
|
|
||||||
::
|
``block`` [*OPTIONS* ...]
|
||||||
|
|
||||||
block [OPTIONS...]
|
|
||||||
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
@ -24,16 +22,17 @@ Event blocks should not be confused with code blocks, which are created with ``b
|
||||||
|
|
||||||
The following parameters are available:
|
The following parameters are available:
|
||||||
|
|
||||||
- ``-l`` or ``--local`` Release the block automatically at the end of the current innermost code block scope
|
**-l** or **--local**
|
||||||
|
Release the block automatically at the end of the current innermost code block scope
|
||||||
|
|
||||||
- ``-g`` or ``--global`` Never automatically release the lock
|
**-g** or **--global**
|
||||||
|
Never automatically release the lock
|
||||||
- ``-e`` or ``--erase`` Release global block
|
|
||||||
|
|
||||||
|
**-e** or **--erase**
|
||||||
|
Release global block
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-------
|
-------
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
# Create a function that listens for events
|
# Create a function that listens for events
|
||||||
|
@ -48,8 +47,7 @@ Example
|
||||||
block -e
|
block -e
|
||||||
# 'foo fired' will now be printed
|
# 'foo fired' will now be printed
|
||||||
|
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Note that events are only received from the current fish process as there is no way to send events from one fish process to another.
|
Events are only received from the current fish process as there is no way to send events from one fish process to another (yet).
|
||||||
|
|
|
@ -6,10 +6,11 @@ break - stop the current inner loop
|
||||||
Synopsis
|
Synopsis
|
||||||
--------
|
--------
|
||||||
|
|
||||||
::
|
| loop_construct
|
||||||
|
| [*COMMANDS* ...]
|
||||||
LOOP_CONSTRUCT; [COMMANDS...] break; [COMMANDS...] end
|
| ``break``
|
||||||
|
| [*COMMANDS* ...]
|
||||||
|
| end
|
||||||
|
|
||||||
Description
|
Description
|
||||||
-----------
|
-----------
|
||||||
|
|
|
@ -6,9 +6,7 @@ breakpoint - launch debug mode
|
||||||
Synopsis
|
Synopsis
|
||||||
--------
|
--------
|
||||||
|
|
||||||
::
|
``breakpoint``
|
||||||
|
|
||||||
breakpoint
|
|
||||||
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
|
@ -6,10 +6,8 @@ builtin - run a builtin command
|
||||||
Synopsis
|
Synopsis
|
||||||
--------
|
--------
|
||||||
|
|
||||||
::
|
| ``builtin`` [*OPTIONS* ...] *BUILTINNAME*
|
||||||
|
| ``builtin`` --query *BUILTINNAMES* ...
|
||||||
builtin [OPTIONS...] BUILTINNAME
|
|
||||||
builtin --query BUILTINNAMES...
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
-----------
|
-----------
|
||||||
|
@ -18,15 +16,14 @@ Description
|
||||||
|
|
||||||
The following parameters are available:
|
The following parameters are available:
|
||||||
|
|
||||||
- ``-n`` or ``--names`` List the names of all defined builtins
|
**-n** or **--names**
|
||||||
- ``-q`` or ``--query`` tests if any of the specified builtins exists
|
List the names of all defined builtins
|
||||||
|
**-q** or **--query**
|
||||||
|
Tests if any of the specified builtin(s) exist
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
builtin jobs
|
builtin jobs
|
||||||
|
|
|
@ -6,9 +6,10 @@ case - conditionally execute a block of commands
|
||||||
Synopsis
|
Synopsis
|
||||||
--------
|
--------
|
||||||
|
|
||||||
::
|
| ``switch`` *VALUE*
|
||||||
|
| [``case`` [*GLOB*...]
|
||||||
switch VALUE; [case [WILDCARD...]; [COMMANDS...]; ...] end
|
| [*COMMAND* ...]]
|
||||||
|
| ``end``
|
||||||
|
|
||||||
Description
|
Description
|
||||||
-----------
|
-----------
|
||||||
|
|
Loading…
Reference in a new issue