mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 13:53:10 +00:00
ad4530acd3
This matches the style in man(1) (except that we use the … ligature). A previous iteration did the reverse (never use a space before the ellipsis). That would be a smaller change.
38 lines
898 B
ReStructuredText
38 lines
898 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
|