mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 13:53:10 +00: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.
45 lines
1.3 KiB
ReStructuredText
45 lines
1.3 KiB
ReStructuredText
string-repeat - multiply a string
|
|
=================================
|
|
|
|
Synopsis
|
|
--------
|
|
|
|
.. BEGIN SYNOPSIS
|
|
|
|
``string`` repeat [(**-n** | **--count**) *COUNT*] [(**-m** | **--max**) *MAX*] [**-N** | **--no-newline**]
|
|
\ [**-q** | **--quiet**] [*STRING* ...]
|
|
|
|
.. END SYNOPSIS
|
|
|
|
Description
|
|
-----------
|
|
|
|
.. BEGIN DESCRIPTION
|
|
|
|
``string repeat`` repeats the STRING ``-n`` or ``--count`` times. The ``-m`` or ``--max`` option will limit the number of outputted char (excluding the newline). This option can be used by itself or in conjunction with ``--count``. If both ``--count`` and ``--max`` are present, max char will be outputed unless the final repeated string size is less than max, in that case, the string will repeat until count has been reached. Both ``--count`` and ``--max`` will accept a number greater than or equal to zero, in the case of zero, nothing will be outputed. If ``-N`` or ``--no-newline`` is given, the output won't contain a newline character at the end. Exit status: 0 if yielded string is not empty, 1 otherwise.
|
|
|
|
.. END DESCRIPTION
|
|
|
|
Examples
|
|
--------
|
|
|
|
.. BEGIN EXAMPLES
|
|
|
|
Repeat Examples
|
|
^^^^^^^^^^^^^^^
|
|
|
|
::
|
|
|
|
>_ string repeat -n 2 'foo '
|
|
foo foo
|
|
|
|
>_ echo foo | string repeat -n 2
|
|
foofoo
|
|
|
|
>_ string repeat -n 2 -m 5 'foo'
|
|
foofo
|
|
|
|
>_ string repeat -m 5 'foo'
|
|
foofo
|
|
|
|
.. END EXAMPLES
|