mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-18 00:31:15 -03:00
Switch \fish sections to rst format
This commit is contained in:
@@ -82,18 +82,21 @@ Example
|
||||
|
||||
The following code stores the value 'hello' in the shell variable `$foo`.
|
||||
|
||||
\fish
|
||||
echo hello|read foo
|
||||
|
||||
# This is a neat way to handle command output by-line:
|
||||
printf '%s\n' line1 line2 line3 line4 | while read -l foo
|
||||
echo "This is another line: $foo"
|
||||
end
|
||||
|
||||
# Delimiters given via "-d" are taken as one string
|
||||
echo a==b==c | read -d == -l a b c
|
||||
echo $a # a
|
||||
echo $b # b
|
||||
echo $c # c
|
||||
::
|
||||
|
||||
echo hello|read foo
|
||||
|
||||
# This is a neat way to handle command output by-line:
|
||||
printf '%s\n' line1 line2 line3 line4 | while read -l foo
|
||||
echo "This is another line: $foo"
|
||||
end
|
||||
|
||||
# Delimiters given via "-d" are taken as one string
|
||||
echo a==b==c | read -d == -l a b c
|
||||
echo $a # a
|
||||
echo $b # b
|
||||
echo $c # c
|
||||
|
||||
|
||||
\endfish
|
||||
|
||||
Reference in New Issue
Block a user