Skip to content

Commit 4d7614d

Browse files
authored
[fish/en] fix style inconsistency, improve process substitution example (#5460)
* use more sensible example for process substitution * style: fix consistency with '> ' prompt prefix in a few places
1 parent 8c0d13a commit 4d7614d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

fish.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ write to a file:
128128
Append to a file:
129129

130130
```
131-
>echo This\ is\ a\ line >> file.txt
132-
>echo This\ is\ a\ second\ line >> file.txt
131+
> echo This\ is\ a\ line >> file.txt
132+
> echo This\ is\ a\ second\ line >> file.txt
133133
```
134134

135135
For Autocompletion, just always press <kbd>TAB</kbd>. You will be surprised how many things fish knows.
@@ -184,7 +184,7 @@ You can use `&&` for two commands that depend on each other.
184184
If you rather want to split a *single* command across multiple lines, use a backslash
185185

186186
```
187-
whoami \ # press Enter here
187+
> whoami \ # press Enter here
188188
--version
189189
```
190190

@@ -302,10 +302,10 @@ set myvar "The files" (ls -a) " are in the directory $PWD"
302302
# Passing the output of a command to another command that only accepts files can
303303
# be done using process substitution.
304304
# In bash, you use <(command):
305-
# diff <(ls dir1) <(ls dir2)
305+
# diff <(sort file1) <(sort file2)
306306
307307
# fish uses (command | psub) for that:
308-
diff (ls dir1 | psub) (ls dir2 | psub)
308+
diff (sort file1 | psub) (sort file2 | psub)
309309
310310
# There's also if, else if, else
311311
if grep -q fish /etc/shells

0 commit comments

Comments
 (0)