mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 02:13:38 +08:00
97db9d5c38
This corrects what looks like wrong alignment of some synopsis lines. (I think the alignment is not a bad idea but it makes us do more manual work, maybe we can automate that in future. We still need to figure out how to translate it to HTML.) "man -l build/user_doc/man/man1/history.1" before: string match [-a | --all] [-e | --entire] [-i | --ignore-case] [-r | --regex] [-n | --index] [-q | --quiet] [-v | --invert] PATTERN [STRING…] and after: string match [-a | --all] [-e | --entire] [-i | --ignore-case] [-r | --regex] [-n | --index] [-q | --quiet] [-v | --invert] PATTERN [STRING…] Also make the lines align the same way in the RST source by carefully choosing the position of the backslash. I'm not sure why we used two backslashes per line. Use only one; this gives us no choice of where to put it so both source and man page output are aligned. Change tabs to spaces to make the alignment in the source work.
39 lines
902 B
ReStructuredText
39 lines
902 B
ReStructuredText
string-trim - remove trailing whitespace
|
|
========================================
|
|
|
|
Synopsis
|
|
--------
|
|
|
|
.. BEGIN SYNOPSIS
|
|
|
|
``string`` trim [**-l** | **--left**] [**-r** | **--right**] [(**-c** | **--chars**) *CHARS*]
|
|
\ [**-q** | **--quiet**] [*STRING* ...]
|
|
|
|
.. END SYNOPSIS
|
|
|
|
Description
|
|
-----------
|
|
|
|
.. BEGIN DESCRIPTION
|
|
|
|
``string trim`` removes leading and trailing whitespace from each STRING. If ``-l`` or ``--left`` is given, only leading whitespace is removed. If ``-r`` or ``--right`` is given, only trailing whitespace is trimmed. The ``-c`` or ``--chars`` switch causes the characters in CHARS to be removed instead of whitespace. Exit status: 0 if at least one character was trimmed, or 1 otherwise.
|
|
|
|
.. END DESCRIPTION
|
|
|
|
Examples
|
|
--------
|
|
|
|
.. BEGIN EXAMPLES
|
|
|
|
::
|
|
|
|
>_ string trim ' abc '
|
|
abc
|
|
|
|
>_ string trim --right --chars=yz xyzzy zany
|
|
x
|
|
zan
|
|
|
|
|
|
.. END EXAMPLES
|