mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 15:14:44 +00:00
Commit doc_src progress.
This is continuing the work I've been doing to remove the :: formatting for the synopsis sections of our manual pages.
This commit is contained in:
parent
4389658e7b
commit
5e880bb1c3
18 changed files with 45 additions and 69 deletions
|
@ -8,7 +8,6 @@ Synopsis
|
|||
|
||||
``breakpoint``
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ complete - edit command specific tab-completions
|
|||
Synopsis
|
||||
--------
|
||||
|
||||
``complete`` **-c** | **--command** | **-p** | **--path** [*OPTIONS*] *COMMAND*
|
||||
``complete`` **-c** | **--command** | **-p** | **--path** [*options*] *COMMAND*
|
||||
``complete`` **-C** *STRING* | **--do-complete** *STRING*
|
||||
|
||||
Description
|
||||
|
|
|
@ -6,9 +6,7 @@ contains - test if a word is present in a list
|
|||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
contains [OPTIONS] KEY [VALUES...]
|
||||
``contains`` [**options**] *KEY* [*VALUE* ...]
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
|
|
@ -6,9 +6,7 @@ continue - skip the remainder of the current iteration of the current inner loop
|
|||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
LOOP_CONSTRUCT; [COMMANDS...;] continue; [COMMANDS...;] end
|
||||
**LOOP_CONSTRUCT**; [**COMMANDS**...;] ``continue``; [**COMMANDS**...;] **end**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
|
|
@ -6,11 +6,9 @@ count - count the number of elements of a list
|
|||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
count $VARIABLE
|
||||
COMMAND | count
|
||||
count < FILE
|
||||
| ``count`` string1 string2...
|
||||
| *command* | ``count``
|
||||
| ``count`` [...] < *FILE*
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
|
|
@ -6,9 +6,7 @@ dirh - print directory history
|
|||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
dirh
|
||||
``dirh``
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
|
|
@ -6,10 +6,7 @@ dirs - print directory stack
|
|||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
dirs
|
||||
dirs -c
|
||||
``dirs`` [*-c*]
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
|
|
@ -6,9 +6,7 @@ disown - remove a process from the list of jobs
|
|||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
disown [ PID ... ]
|
||||
disown [ **PID** ... ]
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
|
|
@ -6,14 +6,12 @@ echo - display a line of text
|
|||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
echo [OPTIONS] [STRING]
|
||||
``echo`` [*options*] [*STRING*]
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
``echo`` displays a string of text.
|
||||
``echo`` displays *STRING* of text.
|
||||
|
||||
The following options are available:
|
||||
|
||||
|
|
|
@ -6,22 +6,20 @@ else - execute command if a condition is not met
|
|||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
if CONDITION; COMMANDS_TRUE...; [else; COMMANDS_FALSE...;] end
|
||||
**if** *CONDITION*; *COMMANDS_TRUE*...; [``else``; *COMMANDS_FALSE*...;] **end**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
:ref:`if <cmd-if>` will execute the command ``CONDITION``. If the condition's exit status is 0, the commands ``COMMANDS_TRUE`` will execute. If it is not 0 and ``else`` is given, ``COMMANDS_FALSE`` will be executed.
|
||||
:ref:`if <cmd-if>` will execute the command **CONDITION**.
|
||||
If the condition's exit status is 0, the commands *COMMANDS_TRUE* will execute.
|
||||
If it is not 0 and ``else`` is given, *COMMANDS_FALSE* will be executed.
|
||||
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
The following code tests whether a file ``foo.txt`` exists as a regular file.
|
||||
|
||||
|
||||
The following code tests whether a file *foo.txt* exists as a regular file.
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -6,9 +6,7 @@ emit - emit a generic event
|
|||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
emit EVENT_NAME [ARGUMENTS...]
|
||||
``emit`` *EVENT_NAME* [*ARGUMENTS*...]
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
|
|
@ -6,23 +6,25 @@ end - end a block of commands
|
|||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
| **begin**
|
||||
| [*COMMANDS*...]
|
||||
| **end**
|
||||
|
||||
begin; [COMMANDS...] end
|
||||
function NAME [OPTIONS]; COMMANDS...; end
|
||||
if CONDITION; COMMANDS_TRUE...; [else; COMMANDS_FALSE...;] end
|
||||
switch VALUE; [case [WILDCARD...]; [COMMANDS...]; ...] end
|
||||
while CONDITION; COMMANDS...; end
|
||||
for VARNAME in [VALUES...]; COMMANDS...; end
|
||||
| **function** *NAME* [*OPTIONS*]; *COMMANDS*...; **end**
|
||||
| **if** *CONDITION*; *COMMANDS_TRUE*...; [**else**; *COMMANDS_FALSE*...;] **end**
|
||||
| **switch** *VALUE*; [**case** [*WILDCARD*...]; [*COMMANDS*...]; ...] **end**
|
||||
| **while** *CONDITION*; *COMMANDS*...; **end**
|
||||
| **for** *VARNAME* in [*VALUES*...]; **COMMANDS**...; **end**
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
``end`` ends a block of commands started by one of the following commands:
|
||||
The **end** keyword ends a block of commands started by one of the following commands:
|
||||
|
||||
- :ref:`begin <cmd-begin>` to start a block of commands
|
||||
- :ref:`function <cmd-function>` to define a function
|
||||
- :ref:`if <cmd-if>`, :ref:`switch <cmd-switch>` to conditionally execute commands
|
||||
- :ref:`while <cmd-while>`, :ref:`for <cmd-for>` to perform commands multiple times
|
||||
|
||||
The ``end`` command does not change the current exit status. Instead, the status after it will be the status returned by the most recent command.
|
||||
The **end** keyword does not change the current exit status.
|
||||
Instead, the status after it will be the status returned by the most recent command.
|
||||
|
|
|
@ -6,20 +6,18 @@ eval - evaluate the specified commands
|
|||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
eval [COMMANDS...]
|
||||
**eval** [*COMMANDS*...]
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
``eval`` evaluates the specified parameters as a command. If more than one parameter is specified, all parameters will be joined using a space character as a separator.
|
||||
**eval** evaluates the specified parameters as a command.
|
||||
If more than one parameter is specified, all parameters will be joined using a space character as a separator.
|
||||
|
||||
If your command does not need access to stdin, consider using :ref:`source <cmd-source>` instead.
|
||||
If the command does not need access to stdin, consider using :ref:`source <cmd-source>` instead.
|
||||
|
||||
If no piping or other compound shell constructs are required, variable-expansion-as-command, as in ``set cmd ls -la; $cmd``, is also an option.
|
||||
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
|
@ -30,4 +28,3 @@ The following code will call the ls command and truncate each filename to the fi
|
|||
set cmd ls \| cut -c 1-12
|
||||
eval $cmd
|
||||
|
||||
|
||||
|
|
|
@ -6,9 +6,7 @@ exec - execute command in current process
|
|||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
exec COMMAND [OPTIONS...]
|
||||
**exec** *COMMAND*
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
|
|
@ -6,16 +6,18 @@ fg - bring job to foreground
|
|||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
fg [PID]
|
||||
**fg** [*PID*]
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
``fg`` brings the specified :ref:`job <syntax-job-control>` to the foreground, resuming it if it is stopped. While a foreground job is executed, fish is suspended. If no job is specified, the last job to be used is put in the foreground. If ``PID`` is specified, the job containing a process with the specified process ID is put in the foreground.
|
||||
The **fg** builtin brings the specified :ref:`job <syntax-job-control>` to the foreground, resuming it if it is stopped.
|
||||
While a foreground job is executed, fish is suspended.
|
||||
If no job is specified, the last job to be used is put in the foreground.
|
||||
If ``PID`` is specified, the job containing a process with the specified process ID is put in the foreground.
|
||||
|
||||
For compatibility with other shells, job expansion syntax is supported for ``fg``. A ``PID`` of the format ``%1`` will foreground job 1. Job numbers can be seen in the output of :ref:`jobs <cmd-jobs>`.
|
||||
For compatibility with other shells, job expansion syntax is supported for ``fg``. A ``PID`` of the format ``%1`` will foreground job 1.
|
||||
Job numbers can be seen in the output of :ref:`jobs <cmd-jobs>`.
|
||||
|
||||
Example
|
||||
-------
|
||||
|
|
|
@ -8,7 +8,6 @@ Synopsis
|
|||
--------
|
||||
|
||||
**fish** [*OPTIONS*] [*FILE* [*ARGS* ...]]
|
||||
|
||||
**fish** [*OPTIONS*] [**-c** *COMMAND* [*ARGS* ...]]
|
||||
|
||||
Description
|
||||
|
|
|
@ -7,9 +7,9 @@ fish_add_path - add to the path
|
|||
Synopsis
|
||||
--------
|
||||
|
||||
**fish_add_path** *path*...
|
||||
``fish_add_path`` *path*...
|
||||
|
||||
**fish_add_path** [(*-g* | *--global*) | (*-U* | *--universal*) | (*-P* | *--path*)] [(*-m* | *--move*)] [(*-a* | *--append*) | (*-p* | *--prepend*)] [(*-v* | *--verbose*) | (*-n* | *--dry-run*)] *paths*...
|
||||
``fish_add_path`` [(*-g* | *--global*) | (*-U* | *--universal*) | (*-P* | *--path*)] [(*-m* | *--move*)] [(*-a* | *--append*) | (*-p* | *--prepend*)] [(*-v* | *--verbose*) | (*-n* | *--dry-run*)] *paths*...
|
||||
|
||||
|
||||
Description
|
||||
|
|
|
@ -6,11 +6,9 @@ fish_breakpoint_prompt - define the prompt when stopped at a breakpoint
|
|||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
function fish_breakpoint_prompt
|
||||
...
|
||||
end
|
||||
| **function** *fish_breakpoint_prompt*
|
||||
| ...
|
||||
| end
|
||||
|
||||
|
||||
Description
|
||||
|
|
Loading…
Reference in a new issue