fish-shell/doc_src/cmds/string-trim.rst
Johannes Altmanninger 97db9d5c38 docs synopses: fix alignment of continuation lines
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.
2022-01-16 14:05:47 +01:00

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