mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
docs/language: Improve an example
If a code sample uses prompt-style (with `>` lines) it needs to do that consistently, or the rest is taken as output and not highlighted.
This commit is contained in:
parent
c844b974b3
commit
21c09c392b
1 changed files with 8 additions and 4 deletions
|
@ -1191,11 +1191,15 @@ Fish automatically creates lists from all environment variables whose name ends
|
|||
|
||||
Lists can be inspected with the :doc:`count <cmds/count>` or the :doc:`contains <cmds/contains>` commands::
|
||||
|
||||
count $smurf
|
||||
# 2
|
||||
> count $smurf
|
||||
2
|
||||
|
||||
contains blue $smurf
|
||||
# key found, exits with status 0
|
||||
> contains blue $smurf
|
||||
# blue was found, so it exits with status 0
|
||||
# (without printing anything)
|
||||
|
||||
> echo $status
|
||||
0
|
||||
|
||||
> contains -i blue $smurf
|
||||
1
|
||||
|
|
Loading…
Reference in a new issue