mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +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:
|
||||
|
||||
``-k`` or ``--key``
|
||||
**-k** or **--key**
|
||||
Specify a key name, such as 'left' or 'backspace' instead of a character sequence
|
||||
|
||||
``-K`` or ``--key-names``
|
||||
Display a list of available key names. Specifying ``-a`` or ``--all`` includes keys that don't have a known mapping
|
||||
**-K** or **--key-names**
|
||||
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
|
||||
|
||||
``-L`` or ``--list-modes``
|
||||
**-L** or **--list-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"
|
||||
|
||||
``-m NEW_MODE`` or ``--sets-mode NEW_MODE``
|
||||
Change the current mode to ``NEW_MODE`` after this binding is executed
|
||||
**-m NEW_MODE** or **--sets-mode** *NEW_MODE*
|
||||
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.
|
||||
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`` without ``-M`` or ``--mode`` erases all binds in all modes 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.
|
||||
|
||||
``-a`` or ``--all``
|
||||
See ``--erase`` and ``--key-names``
|
||||
**-a** or **--all**
|
||||
See **--erase** and **--key-names**
|
||||
|
||||
``--preset`` and ``--user``
|
||||
**--preset** and **--user**
|
||||
Specify if bind should operate on user or preset bindings.
|
||||
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.
|
||||
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``).
|
||||
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``).
|
||||
|
||||
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
|
||||
|
||||
``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``
|
||||
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
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
block [OPTIONS...]
|
||||
``block`` [*OPTIONS* ...]
|
||||
|
||||
|
||||
Description
|
||||
|
@ -24,16 +22,17 @@ Event blocks should not be confused with code blocks, which are created with ``b
|
|||
|
||||
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
|
||||
|
||||
- ``-e`` or ``--erase`` Release global block
|
||||
**-g** or **--global**
|
||||
Never automatically release the lock
|
||||
|
||||
**-e** or **--erase**
|
||||
Release global block
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
::
|
||||
|
||||
# Create a function that listens for events
|
||||
|
@ -48,8 +47,7 @@ Example
|
|||
block -e
|
||||
# 'foo fired' will now be printed
|
||||
|
||||
|
||||
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
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
LOOP_CONSTRUCT; [COMMANDS...] break; [COMMANDS...] end
|
||||
|
||||
| loop_construct
|
||||
| [*COMMANDS* ...]
|
||||
| ``break``
|
||||
| [*COMMANDS* ...]
|
||||
| end
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
|
|
@ -6,9 +6,7 @@ breakpoint - launch debug mode
|
|||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
breakpoint
|
||||
``breakpoint``
|
||||
|
||||
|
||||
Description
|
||||
|
|
|
@ -6,10 +6,8 @@ builtin - run a builtin command
|
|||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
builtin [OPTIONS...] BUILTINNAME
|
||||
builtin --query BUILTINNAMES...
|
||||
| ``builtin`` [*OPTIONS* ...] *BUILTINNAME*
|
||||
| ``builtin`` --query *BUILTINNAMES* ...
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
@ -18,15 +16,14 @@ Description
|
|||
|
||||
The following parameters are available:
|
||||
|
||||
- ``-n`` or ``--names`` List the names of all defined builtins
|
||||
- ``-q`` or ``--query`` tests if any of the specified builtins exists
|
||||
|
||||
**-n** or **--names**
|
||||
List the names of all defined builtins
|
||||
**-q** or **--query**
|
||||
Tests if any of the specified builtin(s) exist
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
|
||||
|
||||
::
|
||||
|
||||
builtin jobs
|
||||
|
|
|
@ -6,9 +6,10 @@ case - conditionally execute a block of commands
|
|||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
switch VALUE; [case [WILDCARD...]; [COMMANDS...]; ...] end
|
||||
| ``switch`` *VALUE*
|
||||
| [``case`` [*GLOB*...]
|
||||
| [*COMMAND* ...]]
|
||||
| ``end``
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
|
Loading…
Reference in a new issue