From bb1aa5e72fc8423704872793c517a762e9786f14 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 2 Feb 2021 08:35:38 +0100 Subject: [PATCH] docs: Make more code lines shorter --- doc_src/cmds/alias.rst | 3 ++- doc_src/cmds/count.rst | 3 ++- doc_src/cmds/set.rst | 2 +- doc_src/cmds/while.rst | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc_src/cmds/alias.rst b/doc_src/cmds/alias.rst index e9d6adaae..2c1644f92 100644 --- a/doc_src/cmds/alias.rst +++ b/doc_src/cmds/alias.rst @@ -47,6 +47,7 @@ The following code will create ``rmi``, which runs ``rm`` with additional argume rm -i $argv end - # This needs to have the spaces escaped or "Chrome.app..." will be seen as an argument to "/Applications/Google": + # This needs to have the spaces escaped or "Chrome.app..." + # will be seen as an argument to "/Applications/Google": alias chrome='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome banana' diff --git a/doc_src/cmds/count.rst b/doc_src/cmds/count.rst index 4a1ff1948..44a1c644c 100644 --- a/doc_src/cmds/count.rst +++ b/doc_src/cmds/count.rst @@ -34,7 +34,8 @@ Example # Returns the number of directories in the users PATH variable. count *.txt - # Returns the number of files in the current working directory ending with the suffix '.txt'. + # Returns the number of files in the current working directory + # ending with the suffix '.txt'. git ls-files --others --exclude-standard | count # Returns the number of untracked files in a git repository diff --git a/doc_src/cmds/set.rst b/doc_src/cmds/set.rst index fe41d9e80..8fab9f770 100644 --- a/doc_src/cmds/set.rst +++ b/doc_src/cmds/set.rst @@ -135,7 +135,7 @@ Examples set foo banana (false) echo $status # prints 1, because of the "(false)" above. - # Like other shells, fish 3.1 supports this syntax for passing a variable to just one command: + # Like other shells, pass a variable to just one command: # Run fish with a temporary home directory. HOME=(mktemp -d) fish # Which is essentially the same as: diff --git a/doc_src/cmds/while.rst b/doc_src/cmds/while.rst index de0c0d370..8575ea824 100644 --- a/doc_src/cmds/while.rst +++ b/doc_src/cmds/while.rst @@ -28,5 +28,6 @@ Example :: while test -f foo.txt; or test -f bar.txt ; echo file exists; sleep 10; end - # outputs 'file exists' at 10 second intervals as long as the file foo.txt or bar.txt exists. + # outputs 'file exists' at 10 second intervals, + # as long as the file foo.txt or bar.txt exists.