docs: whitespace cleanup in source

Fixes some lint warnings.
This commit is contained in:
David Adam 2019-09-17 16:50:52 +08:00
parent f11ee26aae
commit 605885f851
10 changed files with 57 additions and 116 deletions

View file

@ -32,8 +32,6 @@ The following parameters are available:
Example Example
------- -------
:: ::
# Create a function that listens for events # Create a function that listens for events
@ -49,7 +47,6 @@ Example
# 'foo fired' will now be printed # 'foo fired' will now be printed
Notes Notes
----- -----

View file

@ -19,8 +19,6 @@ You may be interested in the :ref:`cdh <cmd-cdh>` command which provides a more
Example Example
------- -------
:: ::
pushd /usr/src pushd /usr/src

View file

@ -19,8 +19,6 @@ To change the number of characters per path component, set $fish_prompt_pwd_dir_
Examples Examples
-------- --------
:: ::
>_ cd ~/ >_ cd ~/
@ -37,4 +35,3 @@ Examples
>_ set -g fish_prompt_pwd_dir_length 3 >_ set -g fish_prompt_pwd_dir_length 3
>_ prompt_pwd >_ prompt_pwd
/tmp/ban/sau/wit/mustard /tmp/ban/sau/wit/mustard

View file

@ -25,8 +25,6 @@ The following options are available:
Example Example
------- -------
:: ::
diff (sort a.txt | psub) (sort b.txt | psub) diff (sort a.txt | psub) (sort b.txt | psub)

View file

@ -27,8 +27,6 @@ You may be interested in the :ref:`cdh <cmd-cdh>` command which provides a more
Example Example
------- -------
:: ::
pushd /usr/src pushd /usr/src
@ -50,4 +48,3 @@ Example
popd popd
# Working directory is now /usr/src/fish-shell # Working directory is now /usr/src/fish-shell
# Directory stack contains /usr/src/fish-shell /tmp # Directory stack contains /usr/src/fish-shell /tmp

View file

@ -100,5 +100,3 @@ The following code stores the value 'hello' in the shell variable ``$foo``.
echo $a # a echo $a # a
echo $b # b echo $b # b
echo $c # c echo $c # c

View file

@ -118,7 +118,6 @@ Examples
echo "Python is at $python_path" echo "Python is at $python_path"
end end
Notes Notes
----- -----

View file

@ -261,8 +261,6 @@ Like ``sed``\ s `s/` command, ``string replace`` still prints strings that don't
Examples Examples
-------- --------
:: ::
>_ string length 'hello, world' >_ string length 'hello, world'
@ -273,9 +271,6 @@ Examples
0 0
# Equivalent to test -n $str # Equivalent to test -n $str
:: ::
>_ string sub --length 2 abcde >_ string sub --length 2 abcde
@ -287,9 +282,6 @@ Examples
>_ string sub --start=-2 abcde >_ string sub --start=-2 abcde
de de
:: ::
>_ string split . example.com >_ string split . example.com
@ -305,17 +297,11 @@ Examples
b b
c c
:: ::
>_ seq 3 | string join ... >_ seq 3 | string join ...
1...2...3 1...2...3
:: ::
>_ string trim ' abc ' >_ string trim ' abc '
@ -325,25 +311,16 @@ Examples
x x
zan zan
:: ::
>_ echo \\x07 | string escape >_ echo \\x07 | string escape
cg cg
:: ::
>_ string escape --style=var 'a1 b2'\\u6161 >_ string escape --style=var 'a1 b2'\\u6161
a1_20b2__c_E6_85_A1 a1_20b2__c_E6_85_A1
:: ::
>_ echo \"(echo one\ntwo\nthree | string collect)\" >_ echo \"(echo one\ntwo\nthree | string collect)\"
@ -361,8 +338,6 @@ Examples
Match Glob Examples Match Glob Examples
------------------- -------------------
:: ::
>_ string match '?' a >_ string match '?' a
@ -386,19 +361,14 @@ Match Glob Examples
foo foo
foo2 foo2
>_ string match 'foo?' 'foo1' 'foo' 'foo2' >_ string match 'foo?' 'foo1' 'foo' 'foo2'
foo1 foo1
foo foo
foo2 foo2
Match Regex Examples Match Regex Examples
-------------------- --------------------
:: ::
>_ string match -r 'cat|dog|fish' 'nice dog' >_ string match -r 'cat|dog|fish' 'nice dog'
@ -432,12 +402,9 @@ Match Regex Examples
>_ string match -r -i '0x[0-9a-f]{{1,8}}' 'int magic = 0xBadC0de;' >_ string match -r -i '0x[0-9a-f]{{1,8}}' 'int magic = 0xBadC0de;'
0xBadC0de 0xBadC0de
NUL Delimited Examples NUL Delimited Examples
---------------------- ----------------------
:: ::
>_ # Count files in a directory, without being confused by newlines. >_ # Count files in a directory, without being confused by newlines.
@ -450,12 +417,9 @@ NUL Delimited Examples
>_ string escape $foo[1] >_ string escape $foo[1]
alpha\\ngamma alpha\\ngamma
Replace Literal Examples Replace Literal Examples
------------------------ ------------------------
:: ::
>_ string replace is was 'blue is my favorite' >_ string replace is was 'blue is my favorite'
@ -469,12 +433,9 @@ Replace Literal Examples
>_ string replace -a ' ' _ 'spaces to underscores' >_ string replace -a ' ' _ 'spaces to underscores'
spaces_to_underscores spaces_to_underscores
Replace Regex Examples Replace Regex Examples
---------------------- ----------------------
:: ::
>_ string replace -r -a '[^\\d.]+' ' ' '0 one two 3.14 four 5x' >_ string replace -r -a '[^\\d.]+' ' ' '0 one two 3.14 four 5x'
@ -487,12 +448,9 @@ Replace Regex Examples
put a put a
here here
Repeat Examples Repeat Examples
--------------- ---------------
:: ::
>_ string repeat -n 2 'foo ' >_ string repeat -n 2 'foo '
@ -506,4 +464,3 @@ Repeat Examples
>_ string repeat -m 5 'foo' >_ string repeat -m 5 'foo'
foofo foofo