mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 03:03:57 +08:00
docs: Make more code lines shorter
This commit is contained in:
parent
8bb3d1198f
commit
bb1aa5e72f
|
@ -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'
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user