diff --git a/doc_src/tutorial.hdr b/doc_src/tutorial.hdr index c21277813..84e72cdba 100644 --- a/doc_src/tutorial.hdr +++ b/doc_src/tutorial.hdr @@ -450,6 +450,22 @@ else end \endfish +To check string, number or file properties, use test, like + +\fish{cli-dark} +if test "$fish" = "flounder" + echo FLOUNDER +end + +# or + +if test "$number" -gt 5 + echo $number is greater than five +else + echo $number is five or less +end +\endfish + Combiners can also be used to make more complex conditions, like \fish