diff --git a/doc_src/cmds/nextd.rst b/doc_src/cmds/nextd.rst index 0018868a6..66572b064 100644 --- a/doc_src/cmds/nextd.rst +++ b/doc_src/cmds/nextd.rst @@ -6,9 +6,7 @@ nextd - move forward through directory history Synopsis -------- -:: - - nextd [ -l | --list ] [POS] +``nextd`` [ **-l** | **--list** ] [*POS*] Description ----------- diff --git a/doc_src/cmds/not.rst b/doc_src/cmds/not.rst index 0c13eb5de..a6dfe2fa4 100644 --- a/doc_src/cmds/not.rst +++ b/doc_src/cmds/not.rst @@ -6,9 +6,7 @@ not - negate the exit status of a job Synopsis -------- -:: - - not COMMAND [OPTIONS...] +**not** *COMMAND* [*options*...] Description diff --git a/doc_src/cmds/open.rst b/doc_src/cmds/open.rst index 43dcbb2d4..b04f15efc 100644 --- a/doc_src/cmds/open.rst +++ b/doc_src/cmds/open.rst @@ -6,9 +6,7 @@ open - open file in its default application Synopsis -------- -:: - - open FILES... +``open`` *FILES*... Description diff --git a/doc_src/cmds/or.rst b/doc_src/cmds/or.rst index de4bbd055..8a932d802 100644 --- a/doc_src/cmds/or.rst +++ b/doc_src/cmds/or.rst @@ -6,9 +6,7 @@ or - conditionally execute a command Synopsis -------- -:: - - COMMAND1; or COMMAND2 +*COMMAND1*; **or** *COMMAND2* Description ----------- diff --git a/doc_src/cmds/popd.rst b/doc_src/cmds/popd.rst index 86511e29b..38567b5df 100644 --- a/doc_src/cmds/popd.rst +++ b/doc_src/cmds/popd.rst @@ -6,9 +6,7 @@ popd - move through directory stack Synopsis -------- -:: - - popd +``popd`` Description ----------- diff --git a/doc_src/cmds/prevd.rst b/doc_src/cmds/prevd.rst index 3efb4f131..1214c6a36 100644 --- a/doc_src/cmds/prevd.rst +++ b/doc_src/cmds/prevd.rst @@ -6,9 +6,7 @@ prevd - move backward through directory history Synopsis -------- -:: - - prevd [ -l | --list ] [POS] +``prevd`` [ **-l** | **--list** ] [*POS*] Description ----------- diff --git a/doc_src/cmds/printf.rst b/doc_src/cmds/printf.rst index 3bfd11e79..2febca422 100644 --- a/doc_src/cmds/printf.rst +++ b/doc_src/cmds/printf.rst @@ -6,9 +6,7 @@ printf - display text according to a format string Synopsis -------- -:: - - printf FORMAT [ARGUMENT ...] +``printf`` *FORMAT* [*ARGUMENT* ...] Description ----------- diff --git a/doc_src/cmds/prompt_hostname.rst b/doc_src/cmds/prompt_hostname.rst index a8842c429..1751abaa2 100644 --- a/doc_src/cmds/prompt_hostname.rst +++ b/doc_src/cmds/prompt_hostname.rst @@ -6,11 +6,7 @@ prompt_hostname - print the hostname, shortened for use in the prompt Synopsis -------- -:: - - function fish_prompt - echo -n (whoami)@(prompt_hostname) (prompt_pwd) '$ ' - end +``prompt_hostname`` Description ----------- @@ -20,6 +16,12 @@ Description Examples -------- +:: + + function fish_prompt + echo -n (whoami)@(prompt_hostname) (prompt_pwd) '$ ' + end + :: # The machine's full hostname is foo.bar.com diff --git a/doc_src/cmds/prompt_login.rst b/doc_src/cmds/prompt_login.rst index 29e0d699b..2741e4b6a 100644 --- a/doc_src/cmds/prompt_login.rst +++ b/doc_src/cmds/prompt_login.rst @@ -6,11 +6,7 @@ prompt_login - describe the login suitable for prompt Synopsis -------- -:: - - function fish_prompt - echo -n (prompt_login) (prompt_pwd) '$ ' - end +``prompt_login`` Description ----------- @@ -19,6 +15,11 @@ Description Examples -------- +:: + + function fish_prompt + echo -n (prompt_login) (prompt_pwd) '$ ' + end :: diff --git a/doc_src/cmds/prompt_pwd.rst b/doc_src/cmds/prompt_pwd.rst index 84e2bbc65..7437694f7 100644 --- a/doc_src/cmds/prompt_pwd.rst +++ b/doc_src/cmds/prompt_pwd.rst @@ -6,11 +6,7 @@ prompt_pwd - print pwd suitable for prompt Synopsis -------- -:: - - function fish_prompt - echo -n (prompt_pwd) '$ ' - end +``prompt_pwd`` Description ----------- diff --git a/doc_src/cmds/psub.rst b/doc_src/cmds/psub.rst index 188dd6a9a..cdd4008f0 100644 --- a/doc_src/cmds/psub.rst +++ b/doc_src/cmds/psub.rst @@ -6,9 +6,7 @@ psub - perform process substitution Synopsis -------- -:: - - COMMAND1 ( COMMAND2 | psub [-F | --fifo] [-f | --file] [-s SUFFIX]) +*COMMAND1* ( *COMMAND2* | ``psub`` [**-F** | -**-fifo**] [**-f** | **--file**] [**-s** *SUFFIX*] ) Description ----------- diff --git a/doc_src/cmds/pushd.rst b/doc_src/cmds/pushd.rst index 4b910f6f1..66fd57a33 100644 --- a/doc_src/cmds/pushd.rst +++ b/doc_src/cmds/pushd.rst @@ -6,9 +6,7 @@ pushd - push directory to directory stack Synopsis -------- -:: - - pushd [DIRECTORY] +``pushd`` *DIRECTORY* Description ----------- diff --git a/doc_src/cmds/pwd.rst b/doc_src/cmds/pwd.rst index fe6f13fc3..ce4244bdc 100644 --- a/doc_src/cmds/pwd.rst +++ b/doc_src/cmds/pwd.rst @@ -6,9 +6,8 @@ pwd - output the current working directory Synopsis -------- -:: - - pwd [(-P | --physical)] [(-L | --logical)] +| ``pwd`` [**-P** | **--physical**] +| ``pwd`` [**-L** | **--logical**] Description diff --git a/doc_src/cmds/random.rst b/doc_src/cmds/random.rst index 5455ccc3b..93696b04a 100644 --- a/doc_src/cmds/random.rst +++ b/doc_src/cmds/random.rst @@ -6,13 +6,11 @@ random - generate random number Synopsis -------- -:: - - random - random SEED - random START END - random START STEP END - random choice [ITEMS...] +| ``random`` +| ``random`` *SEED* +| ``random`` *START* *END* +| ``random`` *START* *STEP* *END* +| ``random`` choice [*ITEMS*...] Description ----------- diff --git a/doc_src/cmds/read.rst b/doc_src/cmds/read.rst index 08093b431..c52049b4b 100644 --- a/doc_src/cmds/read.rst +++ b/doc_src/cmds/read.rst @@ -6,9 +6,7 @@ read - read line of input into variables Synopsis -------- -:: - - read [OPTIONS] [VARIABLE ...] +``read`` [*options*] [*VARIABLE* ...] Description ----------- diff --git a/doc_src/cmds/set.rst b/doc_src/cmds/set.rst index 6ffac2bfc..00d6f71f3 100644 --- a/doc_src/cmds/set.rst +++ b/doc_src/cmds/set.rst @@ -6,22 +6,20 @@ set - display and change shell variables Synopsis -------- -:: - - set [SCOPE_OPTIONS] - set [OPTIONS] VARIABLE_NAME VALUES... - set [OPTIONS] VARIABLE_NAME[INDICES]... VALUES... - set ( -q | --query ) [SCOPE_OPTIONS] VARIABLE_NAMES... - set ( -e | --erase ) [SCOPE_OPTIONS] VARIABLE_NAME... - set ( -e | --erase ) [SCOPE_OPTIONS] VARIABLE_NAME[INDICES]... - set ( -S | --show ) [VARIABLE_NAME]... +| ``set`` [*scope options*] +| ``set`` [*options*] *VARIABLE* *VALUES*... +| ``set`` [*options*] *VARIABLE*[*indicies*]... *VALUES*... +| ``set`` ( **-q** | **--query** ) [*scope options*] *VARIABLE* ... +| ``set`` ( **-e** | **--erase** ) [*scope options*] *VARIABLE* ... +| ``set`` ( **-e** | **--erase** ) [*scope options*] *VARIABLE*\[*indicies*] ... +| ``set`` ( **-S** | **--show** ) *VARIABLE*... Description ----------- ``set`` manipulates :ref:`shell variables `. -If both a variable name and values are provided, ``set`` assigns the values to the variable of that name. Because all variables in fish are :ref:`lists `, multiple values are allowed. +If both a *VARIABLE* and *VALUES* are provided, ``set`` assigns the values to the variable of that name. Because all variables in fish are :ref:`lists `, multiple values are allowed. If only a variable name has been given, ``set`` sets the variable to the empty list. @@ -109,7 +107,6 @@ In erase mode, ``set`` exits with a zero exit status in case of success, with a Examples -------- - :: # Prints all global, exported variables. diff --git a/doc_src/cmds/set_color.rst b/doc_src/cmds/set_color.rst index 50a6cc212..aeac662e5 100644 --- a/doc_src/cmds/set_color.rst +++ b/doc_src/cmds/set_color.rst @@ -6,9 +6,7 @@ set_color - set the terminal color Synopsis -------- -:: - - set_color [OPTIONS] VALUE +``set_color`` [*options*] *VALUE* Description ----------- diff --git a/doc_src/cmds/source.rst b/doc_src/cmds/source.rst index af2203992..faf2845c8 100644 --- a/doc_src/cmds/source.rst +++ b/doc_src/cmds/source.rst @@ -6,16 +6,14 @@ source - evaluate contents of file Synopsis -------- -:: - - source FILENAME [ARGUMENTS...] - somecommand | source +| **source** *FILE* [*arguments*...] +| ``somecommand`` | **source** Description ----------- -``source`` evaluates the commands of the specified file in the current shell as a new block of code. This is different from starting a new process to perform the commands (i.e. ``fish < FILENAME``) since the commands will be evaluated by the current shell, which means that changes in shell variables will affect the current shell. If additional arguments are specified after the file name, they will be inserted into the ``$argv`` variable. The ``$argv`` variable will not include the name of the sourced file. +``source`` evaluates the commands of the specified file in the current shell as a new block of code. This is different from starting a new process to perform the commands (i.e. ``fish < FILE``) since the commands will be evaluated by the current shell, which means that changes in shell variables will affect the current shell. If additional arguments are specified after the file name, they will be inserted into the ``$argv`` variable. The ``$argv`` variable will not include the name of the sourced file. fish will search the working directory to resolve relative paths but will not search ``$PATH``. diff --git a/doc_src/cmds/status.rst b/doc_src/cmds/status.rst index d9a57bbc6..d8ac3e23d 100644 --- a/doc_src/cmds/status.rst +++ b/doc_src/cmds/status.rst @@ -6,28 +6,26 @@ status - query fish runtime information Synopsis -------- -:: - - status - status is-login - status is-interactive - status is-block - status is-breakpoint - status is-command-substitution - status is-no-job-control - status is-full-job-control - status is-interactive-job-control - status current-command - status filename - status basename - status dirname - status fish-path - status function - status line-number - status stack-trace - status job-control CONTROL_TYPE - status features - status test-feature FEATURE + **status** + **status** is-login + **status** is-interactive + **status** is-block + **status** is-breakpoint + **status** is-command-substitution + **status** is-no-job-control + **status** is-full-job-control + **status** is-interactive-job-control + **status** current-command + **status** filename + **status** basename + **status** dirname + **status** fish-path + **status** function + **status** line-number + **status** stack-trace + **status** job-control *CONTROL_TYPE* + **status** features + **status** test-feature *FEATURE* Description ----------- diff --git a/doc_src/cmds/string-collect.rst b/doc_src/cmds/string-collect.rst index 19e757972..0374e046d 100644 --- a/doc_src/cmds/string-collect.rst +++ b/doc_src/cmds/string-collect.rst @@ -6,9 +6,7 @@ Synopsis .. BEGIN SYNOPSIS -:: - - string collect [(-a | --allow-empty)] [(-N | --no-trim-newlines)] [STRING...] +``string`` collect [**-N** | **--no-trim-newlines**] [*STRING*...] .. END SYNOPSIS diff --git a/doc_src/cmds/string-escape.rst b/doc_src/cmds/string-escape.rst index 9584e5309..81599b371 100644 --- a/doc_src/cmds/string-escape.rst +++ b/doc_src/cmds/string-escape.rst @@ -6,10 +6,8 @@ Synopsis .. BEGIN SYNOPSIS -:: - - string escape [(-n | --no-quoted)] [--style=xxx] [STRING...] - string unescape [--style=xxx] [STRING...] +| ``string`` escape [**-n** | **--no-quoted**] [**--style=**] [*STRING*...] +| ``string`` unescape [**--style=**] [*STRING*...] .. END SYNOPSIS diff --git a/doc_src/cmds/string-join.rst b/doc_src/cmds/string-join.rst index 6a2effa1a..a6c6caaac 100644 --- a/doc_src/cmds/string-join.rst +++ b/doc_src/cmds/string-join.rst @@ -6,10 +6,8 @@ Synopsis .. BEGIN SYNOPSIS -:: - - string join [(-q | --quiet)] SEP [STRING...] - string join0 [(-q | --quiet)] [STRING...] +| ``string`` join [**-q** | **--quiet**] SEP [*STRING*...] +| ``string`` join0 [**-q** | **--quiet**] [*STRING*...] .. END SYNOPSIS diff --git a/doc_src/cmds/string-length.rst b/doc_src/cmds/string-length.rst index 3b609b5f5..096b2363f 100644 --- a/doc_src/cmds/string-length.rst +++ b/doc_src/cmds/string-length.rst @@ -8,9 +8,7 @@ Synopsis .. BEGIN SYNOPSIS -:: - - string length [(-q | --quiet)] [(-V | --visible)] [STRING...] +``string`` length [**-q** | **--quiet**] [*STRING*...] .. END SYNOPSIS diff --git a/doc_src/cmds/string-lower.rst b/doc_src/cmds/string-lower.rst index 08e359efe..25dbe6bf0 100644 --- a/doc_src/cmds/string-lower.rst +++ b/doc_src/cmds/string-lower.rst @@ -6,9 +6,7 @@ Synopsis .. BEGIN SYNOPSIS -:: - - string lower [(-q | --quiet)] [STRING...] +``string`` lower [**-q** | **--quiet**] [*STRING*...] .. END SYNOPSIS diff --git a/doc_src/cmds/string-match.rst b/doc_src/cmds/string-match.rst index 3a3eaa0e3..b5035f423 100644 --- a/doc_src/cmds/string-match.rst +++ b/doc_src/cmds/string-match.rst @@ -6,9 +6,9 @@ Synopsis .. BEGIN SYNOPSIS -:: - - string match [(-a | --all)] [(-e | --entire)] [(-i | --ignore-case)] [(-g | --groups-only)] [(-r | --regex)] [(-n | --index)] [(-q | --quiet)] [(-v | --invert)] PATTERN [STRING...] +``string`` match [**-a** | **--all**] [**-e** | **--entire**] [**-i** | **--ignore-case**] + \ \ [**-r** | **--regex**] [**-n** | **--index**] [**-q** | **--quiet**] [**-v** | **--invert**] + \ \ *PATTERN* [*STRING*...] . END SYNOPSIS diff --git a/doc_src/cmds/string-pad.rst b/doc_src/cmds/string-pad.rst index 6b1a0a5fc..ec107318a 100644 --- a/doc_src/cmds/string-pad.rst +++ b/doc_src/cmds/string-pad.rst @@ -6,9 +6,8 @@ Synopsis .. BEGIN SYNOPSIS -:: - - string pad [(-r | --right)] [(-c | --char) CHAR] [(-w | --width) INTEGER] [STRING...] +``string`` pad [**-r** | **--right**] [**-c** | **--char** *CHAR*] [**-w** | **--width** *INTEGER*] + \ \ [*STRING*...] .. END SYNOPSIS diff --git a/doc_src/cmds/string-repeat.rst b/doc_src/cmds/string-repeat.rst index f5b597324..11ba29bbb 100644 --- a/doc_src/cmds/string-repeat.rst +++ b/doc_src/cmds/string-repeat.rst @@ -6,9 +6,8 @@ Synopsis .. BEGIN SYNOPSIS -:: - - string repeat [(-n | --count) COUNT] [(-m | --max) MAX] [(-N | --no-newline)] [(-q | --quiet)] [STRING...] +``string`` repeat [**-n** | **--count** *COUNT*] [**-m** | **--max** *MAX*] [**-N** | **--no-newline**] + \ \ [**-q** | **--quiet**] [*STRING*...] .. END SYNOPSIS diff --git a/doc_src/cmds/string-replace.rst b/doc_src/cmds/string-replace.rst index b9396873d..cbe398777 100644 --- a/doc_src/cmds/string-replace.rst +++ b/doc_src/cmds/string-replace.rst @@ -6,9 +6,8 @@ Synopsis .. BEGIN SYNOPSIS -:: - - string replace [(-a | --all)] [(-f | --filter)] [(-i | --ignore-case)] [(-r | --regex)] [(-q | --quiet)] PATTERN REPLACEMENT [STRING...] +``string`` replace [**-a** | **--all**] [**-f** | **--filter**] [**-i** | **--ignore-case**] + \ \ [**-r** | **--regex**] [**-q** | **--quiet**] *PATTERN* *REPLACE* [*STRING*...] .. END SYNOPSIS diff --git a/doc_src/cmds/string-split.rst b/doc_src/cmds/string-split.rst index a43d9aa86..6a2ae06e9 100644 --- a/doc_src/cmds/string-split.rst +++ b/doc_src/cmds/string-split.rst @@ -6,10 +6,10 @@ Synopsis .. BEGIN SYNOPSIS -:: - - string split [(-f | --fields) FIELDS] [(-m | --max) MAX] [(-n | --no-empty)] [(-q | --quiet)] [(-r | --right)] SEP [STRING...] - string split0 [(-f | --fields) FIELDS] [(-m | --max) MAX] [(-n | --no-empty)] [(-q | --quiet)] [(-r | --right)] [STRING...] +| ``string`` split [**-m** | **--max** *MAX*] [**-n** | **--no-empty**] [**-q** | **--quiet**] + \ \ [**-r** | **--right**] *SEP* [*STRING*...] +| ``string`` split0 [**-m** | **--max** *MAX*] [**-n** | **--no-empty**] [**-q** | **--quiet**] + \ \ [**-r** | **--right**] [*STRING*...] .. END SYNOPSIS diff --git a/doc_src/cmds/string-sub.rst b/doc_src/cmds/string-sub.rst index a10d8f0fa..aa9272622 100644 --- a/doc_src/cmds/string-sub.rst +++ b/doc_src/cmds/string-sub.rst @@ -6,9 +6,8 @@ Synopsis .. BEGIN SYNOPSIS -:: - - string sub [(-s | --start) START] [(-e | --end) END] [(-l | --length) LENGTH] [(-q | --quiet)] [STRING...] +``string`` sub [**-s** | **--start** *START*] [**-l** | **--length** *LENGTH*] + \ [**-q** | **--quiet**] [*STRING*...] .. END SYNOPSIS diff --git a/doc_src/cmds/string-trim.rst b/doc_src/cmds/string-trim.rst index 832f4f653..15d9d2b99 100644 --- a/doc_src/cmds/string-trim.rst +++ b/doc_src/cmds/string-trim.rst @@ -6,9 +6,8 @@ Synopsis .. BEGIN SYNOPSIS -:: - - string trim [(-l | --left)] [(-r | --right)] [(-c | --chars CHARS)] [(-q | --quiet)] [STRING...] +``string`` trim [**-l** | **--left**] [**-r** | **--right**] [**-c** | **--chars** CHARS*] + \ \ [**-q** | **--quiet**] [*STRING*...] .. END SYNOPSIS diff --git a/doc_src/cmds/string-upper.rst b/doc_src/cmds/string-upper.rst index e73da7dfc..5f5661bff 100644 --- a/doc_src/cmds/string-upper.rst +++ b/doc_src/cmds/string-upper.rst @@ -6,9 +6,7 @@ Synopsis .. BEGIN SYNOPSIS -:: - - string upper [(-q | --quiet)] [STRING...] +``string`` upper [**-q** | **--quiet**] [*STRING*...] .. END SYNOPSIS diff --git a/doc_src/cmds/string.rst b/doc_src/cmds/string.rst index 854ff6191..40ab5066a 100644 --- a/doc_src/cmds/string.rst +++ b/doc_src/cmds/string.rst @@ -6,24 +6,31 @@ string - manipulate strings Synopsis -------- -:: - - string collect [(-N | --no-trim-newlines)] [STRING...] - string escape [(-n | --no-quoted)] [--style=xxx] [STRING...] - string join [(-q | --quiet)] SEP [STRING...] - string join0 [(-q | --quiet)] [STRING...] - string length [(-q | --quiet)] [STRING...] - string lower [(-q | --quiet)] [STRING...] - string match [(-a | --all)] [(-e | --entire)] [(-i | --ignore-case)] [(-r | --regex)] [(-n | --index)] [(-q | --quiet)] [(-v | --invert)] PATTERN [STRING...] - string pad [(-r | --right)] [(-c | --char) CHAR] [(-w | --width) INTEGER] [STRING...] - string repeat [(-n | --count) COUNT] [(-m | --max) MAX] [(-N | --no-newline)] [(-q | --quiet)] [STRING...] - string replace [(-a | --all)] [(-f | --filter)] [(-i | --ignore-case)] [(-r | --regex)] [(-q | --quiet)] PATTERN REPLACEMENT [STRING...] - string split [(-m | --max) MAX] [(-n | --no-empty)] [(-q | --quiet)] [(-r | --right)] SEP [STRING...] - string split0 [(-m | --max) MAX] [(-n | --no-empty)] [(-q | --quiet)] [(-r | --right)] [STRING...] - string sub [(-s | --start) START] [(-l | --length) LENGTH] [(-q | --quiet)] [STRING...] - string trim [(-l | --left)] [(-r | --right)] [(-c | --chars CHARS)] [(-q | --quiet)] [STRING...] - string unescape [--style=xxx] [STRING...] - string upper [(-q | --quiet)] [STRING...] +| ``string`` collect [**-N** | **--no-trim-newlines**] [*STRING*...] +| ``string`` escape [**-n** | **--no-quoted**] [**--style=**] [*STRING*...] +| ``string`` join [**-q** | **--quiet**] SEP [*STRING*...] +| ``string`` join0 [**-q** | **--quiet**] [*STRING*...] +| ``string`` length [**-q** | **--quiet**] [*STRING*...] +| ``string`` lower [**-q** | **--quiet**] [*STRING*...] +| ``string`` match [**-a** | **--all**] [**-e** | **--entire**] [**-i** | **--ignore-case**] + \ \ [**-r** | **--regex**] [**-n** | **--index**] [**-q** | **--quiet**] [**-v** | **--invert**] + \ \ *PATTERN* [*STRING*...] +| ``string`` pad [**-r** | **--right**] [**-c** | **--char** *CHAR*] [**-w** | **--width** *INTEGER*] + \ \ [*STRING*...] +| ``string`` repeat [**-n** | **--count** *COUNT*] [**-m** | **--max** *MAX*] [**-N** | **--no-newline**] + \ \ [**-q** | **--quiet**] [*STRING*...] +| ``string`` replace [**-a** | **--all**] [**-f** | **--filter**] [**-i** | **--ignore-case**] + \ \ [**-r** | **--regex**] [**-q** | **--quiet**] *PATTERN* *REPLACE* [*STRING*...] +| ``string`` split [**-m** | **--max** *MAX*] [**-n** | **--no-empty**] [**-q** | **--quiet**] + \ \ [**-r** | **--right**] *SEP* [*STRING*...] +| ``string`` split0 [**-m** | **--max** *MAX*] [**-n** | **--no-empty**] [**-q** | **--quiet**] + \ \ [**-r** | **--right**] [*STRING*...] +| ``string`` sub [**-s** | **--start** *START*] [**-l** | **--length** *LENGTH*] + \ [**-q** | **--quiet**] [*STRING*...] +| ``string`` trim [**-l** | **--left**] [**-r** | **--right**] [**-c** | **--chars** CHARS*] + \ \ [**-q** | **--quiet**] [*STRING*...] +| ``string`` unescape [**--style=**] [*STRING*...] +| ``string`` upper [**-q** | **--quiet**] [*STRING*...] Description ----------- diff --git a/doc_src/cmds/suspend.rst b/doc_src/cmds/suspend.rst index b82ce5940..093490bd6 100644 --- a/doc_src/cmds/suspend.rst +++ b/doc_src/cmds/suspend.rst @@ -6,9 +6,7 @@ suspend - suspend the current shell Synopsis -------- -:: - - suspend [--force] +``suspend`` [**--force**] Description ----------- diff --git a/doc_src/cmds/switch.rst b/doc_src/cmds/switch.rst index ca42f7519..8105c0453 100644 --- a/doc_src/cmds/switch.rst +++ b/doc_src/cmds/switch.rst @@ -6,16 +6,14 @@ switch - conditionally execute a block of commands Synopsis -------- -:: - - switch VALUE; [case [WILDCARD...]; [COMMANDS...]; ...] end +**switch** *VALUE*; [**case** [*GLOB*...]; [*COMMANDS*...]; ...] **end** Description ----------- -``switch`` performs one of several blocks of commands, depending on whether a specified value equals one of several wildcarded values. ``case`` is used together with the ``switch`` statement in order to determine which block should be executed. +``switch`` performs one of several blocks of commands, depending on whether a specified value equals one of several globbed values. ``case`` is used together with the ``switch`` statement in order to determine which block should be executed. -Each ``case`` command is given one or more parameters. The first ``case`` command with a parameter that matches the string specified in the switch command will be evaluated. ``case`` parameters may contain wildcards. These need to be escaped or quoted in order to avoid regular wildcard expansion using filenames. +Each ``case`` command is given one or more parameters. The first ``case`` command with a parameter that matches the string specified in the switch command will be evaluated. ``case`` parameters may contain globs. These need to be escaped or quoted in order to avoid regular glob expansion using filenames. Note that fish does not fall through on case statements. Only the first matching case is executed. diff --git a/doc_src/cmds/test.rst b/doc_src/cmds/test.rst index dcb610efe..f0d550227 100644 --- a/doc_src/cmds/test.rst +++ b/doc_src/cmds/test.rst @@ -6,10 +6,8 @@ test - perform tests on files and text Synopsis -------- -:: - - test [EXPRESSION] - [ [EXPRESSION] ] +| ``test`` [*EXPRESSION*] +| ``[`` [*EXPRESSION*] ] Description diff --git a/doc_src/cmds/time.rst b/doc_src/cmds/time.rst index 2521b1c21..db2d73926 100644 --- a/doc_src/cmds/time.rst +++ b/doc_src/cmds/time.rst @@ -6,9 +6,7 @@ time - measure how long a command or block takes Synopsis -------- -:: - - time COMMAND +**time** *COMMAND* Description ----------- diff --git a/doc_src/cmds/trap.rst b/doc_src/cmds/trap.rst index 37898497f..76603f8a9 100644 --- a/doc_src/cmds/trap.rst +++ b/doc_src/cmds/trap.rst @@ -6,9 +6,7 @@ trap - perform an action when the shell receives a signal Synopsis -------- -:: - - trap [OPTIONS] [[ARG] REASON ... ] +``trap`` [*options*] [[*ARG*] *REASON* ... ] Description ----------- diff --git a/doc_src/cmds/true.rst b/doc_src/cmds/true.rst index ef0c86779..4010a9d73 100644 --- a/doc_src/cmds/true.rst +++ b/doc_src/cmds/true.rst @@ -6,9 +6,7 @@ true - return a successful result Synopsis -------- -:: - - true +``true`` Description ----------- diff --git a/doc_src/cmds/type.rst b/doc_src/cmds/type.rst index a7f8cdb37..6d7b7d54a 100644 --- a/doc_src/cmds/type.rst +++ b/doc_src/cmds/type.rst @@ -6,7 +6,7 @@ type - locate a command and describe its type Synopsis -------- -**type** [*OPTIONS*] *NAME* [*NAME* ...] +``type`` [*options*] *NAME* [...] Description ----------- diff --git a/doc_src/cmds/ulimit.rst b/doc_src/cmds/ulimit.rst index 17273f2c1..d93ebffc9 100644 --- a/doc_src/cmds/ulimit.rst +++ b/doc_src/cmds/ulimit.rst @@ -6,9 +6,7 @@ ulimit - set or get resource usage limits Synopsis -------- -:: - - ulimit [OPTIONS] [LIMIT] +```ulimit`` [**options**] [*limit*] Description diff --git a/doc_src/cmds/umask.rst b/doc_src/cmds/umask.rst index 4c374440d..442394bb9 100644 --- a/doc_src/cmds/umask.rst +++ b/doc_src/cmds/umask.rst @@ -6,9 +6,7 @@ umask - set or get the file creation mode mask Synopsis -------- -:: - - umask [OPTIONS] [MASK] +``umask`` [**options**] [*MASK*] Description diff --git a/doc_src/cmds/vared.rst b/doc_src/cmds/vared.rst index c77599492..487ee7e56 100644 --- a/doc_src/cmds/vared.rst +++ b/doc_src/cmds/vared.rst @@ -6,9 +6,7 @@ vared - interactively edit the value of an environment variable Synopsis -------- -:: - - vared VARIABLE_NAME +``vared`` *VARIABLE_NAME* Description ----------- diff --git a/doc_src/cmds/wait.rst b/doc_src/cmds/wait.rst index 2c11bdde3..2bd1bf693 100644 --- a/doc_src/cmds/wait.rst +++ b/doc_src/cmds/wait.rst @@ -6,9 +6,7 @@ wait - wait for jobs to complete Synopsis -------- -:: - - wait [-n | --any] [PID | PROCESS_NAME] ... +``wait`` [**-n** | **--any**] [*PID* | *PROCESS_NAME*] ... Description ----------- @@ -18,13 +16,11 @@ Description - If a pid is specified, the command waits for the job that the process with the pid belongs to. - If a process name is specified, the command waits for the jobs that the matched processes belong to. - If neither a pid nor a process name is specified, the command waits for all background jobs. -- If the ``-n`` / ``--any`` flag is provided, the command returns as soon as the first job completes. If it is not provided, it returns after all jobs complete. +- If the **-n** / **--any** flag is provided, the command returns as soon as the first job completes. If it is not provided, it returns after all jobs complete. Example ------- - - :: sleep 10 & diff --git a/doc_src/cmds/while.rst b/doc_src/cmds/while.rst index 900780d01..4d7b6c319 100644 --- a/doc_src/cmds/while.rst +++ b/doc_src/cmds/while.rst @@ -6,25 +6,20 @@ while - perform a set of commands multiple times Synopsis -------- -:: - - while CONDITION; COMMANDS...; end - +**while** *CONDITION*; *COMMANDS...*; **end** Description ----------- -``while`` repeatedly executes ``CONDITION``, and if the exit status is 0, then executes ``COMMANDS``. +**while** repeatedly executes ``CONDITION``, and if the exit status is 0, then executes ``COMMANDS``. -The exit status of the while loop is the exit status of the last iteration of the ``COMMANDS`` executed, or 0 if none were executed. (This matches other shells and is POSIX-compatible.) +The exit status of the **while** loop is the exit status of the last iteration of the ``COMMANDS`` executed, or 0 if none were executed. (This matches other shells and is POSIX-compatible.) You can use :ref:`and ` or :ref:`or ` for complex conditions. Even more complex control can be achieved with ``while true`` containing a :ref:`break `. Example ------- - - :: while test -f foo.txt; or test -f bar.txt ; echo file exists; sleep 10; end