docs: use monospace for inline code snippets more consistently

This commit is contained in:
Johannes Altmanninger
2020-10-26 19:19:05 +01:00
parent 5ff2d38d4c
commit 4081d58577
12 changed files with 41 additions and 41 deletions

View File

@@ -27,7 +27,7 @@ Options
The following ``argparse`` options are available. They must appear before all OPTION_SPECs:
- ``-n`` or ``--name`` is the command name for use in error messages. By default the current function name will be used, or `argparse` if run outside of a function.
- ``-n`` or ``--name`` is the command name for use in error messages. By default the current function name will be used, or ``argparse`` if run outside of a function.
- ``-x`` or ``--exclusive`` should be followed by a comma separated list of short or long options that are mutually exclusive. You can use this more than once to define multiple sets of mutually exclusive options.

View File

@@ -224,7 +224,7 @@ For instance, the control key modifies a character by setting the top three bits
- Many characters + control are indistinguishable from other keys. :kbd:`Control`\ +\ :kbd:`I` *is* tab, :kbd:`Control`\ +\ :kbd:`J` *is* newline (`\n`).
- Control and shift don't work simultaneously
Other keys don't have a direct encoding, and are sent as escape sequences. For example :kbd:`→` (Right) often sends `\e\[C`. These can differ from terminal to terminal, and the mapping is typically available in `terminfo(5)`. Sometimes however a terminal identifies as e.g. `xterm-256color` for compatibility, but then implements xterm's sequences incorrectly.
Other keys don't have a direct encoding, and are sent as escape sequences. For example :kbd:`→` (Right) often sends ``\e\[C``. These can differ from terminal to terminal, and the mapping is typically available in `terminfo(5)`. Sometimes however a terminal identifies as e.g. ``xterm-256color`` for compatibility, but then implements xterm's sequences incorrectly.
.. _cmd-bind-escape:

View File

@@ -37,7 +37,7 @@ The following options change what part of the commandline is printed or updated:
- ``-b`` or ``--current-buffer`` select the entire buffer, including any displayed autosuggestion (default)
- ``-j`` or ``--current-job`` select the current job - a `job` here is one pipeline. It stops at logical operators or terminators (`;`, `&` or newlines).
- ``-j`` or ``--current-job`` select the current job - a `job` here is one pipeline. It stops at logical operators or terminators (``;``, ``&`` or newlines).
- ``-p`` or ``--current-process`` select the current process - a `process` here is one simple command. It stops at logical operators, terminators or pipes.
@@ -77,11 +77,11 @@ If the commandline contains
(with the cursor on the "o" of "flounder")
The `echo $flounder >&` is the first process, `less` the second and `and echo $catfish` the third.
The ``echo $flounder >&`` is the first process, ``less`` the second and ``and echo $catfish`` the third.
`echo $flounder >&2 | less` is the first job, `and echo $catfish` the second.
``echo $flounder >&2 | less`` is the first job, ``and echo $catfish`` the second.
`$flounder` is the current token.
``$flounder`` is the current token.
More examples:

View File

@@ -65,7 +65,7 @@ There are numerous customization options, which can be controlled with git optio
A number of variables set characters and color used as indicators. Many of these have a different default if used with informative status enabled, or ``$__fish_git_prompt_use_informative_chars`` set. The usual default is given first, then the informative default (if it is different). If no default for the colors is given, they default to ``$__fish_git_prompt_color``.
- ``$__fish_git_prompt_char_stateseparator`` (' ', `|`) - the character to be used between the state characters
- ``$__fish_git_prompt_char_stateseparator`` (' ', ``|``) - the character to be used between the state characters
- ``$__fish_git_prompt_color`` (no default)
- ``$__fish_git_prompt_color_prefix`` - the color of the ``(`` prefix
- ``$__fish_git_prompt_color_suffix`` - the color of the ``)`` suffix

View File

@@ -14,7 +14,7 @@ Synopsis
Description
-----------
``fish_indent`` is used to indent a piece of fish code. ``fish_indent`` reads commands from standard input or the given filenames and outputs them to standard output or a specified file (if `-w` is given).
``fish_indent`` is used to indent a piece of fish code. ``fish_indent`` reads commands from standard input or the given filenames and outputs them to standard output or a specified file (if ``-w`` is given).
The following options are available:

View File

@@ -42,7 +42,7 @@ Valid format specifiers are taken from the C library function ``printf(3)``:
``%%`` signifies a literal "%".
Conversion can fail, e.g. "102.234" can't losslessly convert to an integer, causing printf to print an error. If you are okay with losing information, silence errors with `2>/dev/null`.
Conversion can fail, e.g. "102.234" can't losslessly convert to an integer, causing printf to print an error. If you are okay with losing information, silence errors with ``2>/dev/null``.
A number between the ``%`` and the format letter specifies the width. The result will be left-padded with spaces.
@@ -68,7 +68,7 @@ printf also knows a number of backslash escapes:
Errors and Return Status
------------------------
If the given argument doesn't work for the given format (like when you try to convert a number like `3.141592` to an integer), printf prints an error, to stderr. printf will then also return non-zero, but will still try to print as much as it can.
If the given argument doesn't work for the given format (like when you try to convert a number like 3.141592 to an integer), printf prints an error, to stderr. printf will then also return non-zero, but will still try to print as much as it can.
It will also return non-zero if no argument at all was given, in which case it will print nothing.
@@ -87,7 +87,7 @@ Will print "flounder fish" (separated with a tab character), followed by a newli
printf '%s: %d' "Number of bananas in my pocket" 42
Will print "Number of bananas in my pocket: 42", _without_ a newline.
Will print "Number of bananas in my pocket: 42", `without` a newline.
See Also
--------
@@ -96,4 +96,4 @@ See Also
Footnotes
---------
.. [#] (in fact while fish's ``echo`` supports ``--``, POSIX forbids it, so other implementations can't be used if the input contains anything starting with `-`)
.. [#] (in fact while fish's ``echo`` supports ``--``, POSIX forbids it, so other implementations can't be used if the input contains anything starting with ``-``)

View File

@@ -30,9 +30,9 @@ The following options are available:
- ``-n NCHARS`` or ``--nchars=NCHARS`` makes ``read`` return after reading NCHARS characters or the end of
the line, whichever comes first.
- ``-p PROMPT_CMD`` or ``--prompt=PROMPT_CMD`` uses the output of the shell command ``PROMPT_CMD`` as the prompt for the interactive mode. The default prompt command is `set_color green; echo read; set_color normal; echo "> "`
- ``-p PROMPT_CMD`` or ``--prompt=PROMPT_CMD`` uses the output of the shell command ``PROMPT_CMD`` as the prompt for the interactive mode. The default prompt command is ``set_color green; echo read; set_color normal; echo "> "``
- ``-P PROMPT_STR`` or ``--prompt-str=PROMPT_STR`` uses the string as the prompt for the interactive mode. It is equivalent to `echo PROMPT_STR` and is provided solely to avoid the need to frame the prompt as a command. All special characters in the string are automatically escaped before being passed to the :ref:`echo <cmd-echo>` command.
- ``-P PROMPT_STR`` or ``--prompt-str=PROMPT_STR`` uses the string as the prompt for the interactive mode. It is equivalent to ``echo PROMPT_STR`` and is provided solely to avoid the need to frame the prompt as a command. All special characters in the string are automatically escaped before being passed to the :ref:`echo <cmd-echo>` command.
- ``-R RIGHT_PROMPT_CMD`` or ``--right-prompt=RIGHT_PROMPT_CMD`` uses the output of the shell command ``RIGHT_PROMPT_CMD`` as the right prompt for the interactive mode. There is no default right prompt command.

View File

@@ -326,8 +326,8 @@ If you are familiar with these, it is useful to know how ``string`` differs from
In contrast to these classics, ``string`` reads input either from stdin or as arguments. ``string`` also does not deal with files, so it requires redirections to be used with them.
In contrast to ``grep``, ``string``\ s `match` defaults to glob-mode, while `replace` defaults to literal matching. If set to regex-mode, they use PCRE regular expressions, which is comparable to ``grep``\ s `-P` option. `match` defaults to printing just the match, which is like ``grep`` with `-o` (use `--entire` to enable grep-like behavior).
In contrast to ``grep``, ``string``'s ``match`` defaults to glob-mode, while ``replace`` defaults to literal matching. If set to regex-mode, they use PCRE regular expressions, which is comparable to ``grep``'s ``-P`` option. ``match`` defaults to printing just the match, which is like ``grep`` with ``-o`` (use ``--entire`` to enable grep-like behavior).
Like ``sed``\ s `s/` command, ``string replace`` still prints strings that don't match. ``sed``\ s `-n` in combination with a `/p` modifier or command is like ``string replace -f``.
Like ``sed``'s ``s/old/new/`` command, ``string replace`` still prints strings that don't match. ``sed``'s ``-n`` in combination with a ``/p`` modifier or command is like ``string replace -f``.
``string split somedelimiter`` is a replacement for ``tr somedelimiter \n``.

View File

@@ -17,7 +17,7 @@ Description
For checking timing after a command has completed, check :ref:`$CMD_DURATION <variables-special>`.
Your system most likely also has a `time` command. To use that use something like `command time`, as in `command time sleep 10`. Because it's not inside fish, it won't have access to fish functions and won't be able to time blocks and such.
Your system most likely also has a ``time`` command. To use that use something like ``command time``, as in ``command time sleep 10``. Because it's not inside fish, it won't have access to fish functions and won't be able to time blocks and such.
Example
-------