mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-30 06:03:49 +08:00
08eac28bd8
This adds string-x.rst for each subcommand x of string. The main page (string.rst) is not changed, except that examples are shown directly after each subcommand. The subcommand sections in string.rst are created by textual inclusion of parts of the string-x.rst files. Subcommand man pages can be viewed with either of: ``` man string collect man string-collect string collect <press F1 or Alt-h> string collect -h ``` While `string -h ...` still prints the full help. Closes #5968
40 lines
859 B
ReStructuredText
40 lines
859 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
|