From 21c09c392b68fecc262743980a23a4ce2fb4927c Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Wed, 28 Dec 2022 20:42:33 +0100 Subject: [PATCH] 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. --- doc_src/language.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/doc_src/language.rst b/doc_src/language.rst index d5f01b645..95a8c2a61 100644 --- a/doc_src/language.rst +++ b/doc_src/language.rst @@ -1191,11 +1191,15 @@ Fish automatically creates lists from all environment variables whose name ends Lists can be inspected with the :doc:`count ` or the :doc:`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