From 3810ef47f7d66f9b34fb0fa003579d86ed41d3ee Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Wed, 12 Aug 2015 14:24:40 +0200 Subject: Add multi-condition example to if documentation --- doc_src/if.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc_src') diff --git a/doc_src/if.txt b/doc_src/if.txt index 0e9a7cb1..1cecdcd3 100644 --- a/doc_src/if.txt +++ b/doc_src/if.txt @@ -30,3 +30,12 @@ else echo foo.txt and bar.txt do not exist end \endfish + +The following code will print "foo.txt exists and is readable" if foo.txt is a regular file and readable +\fish +if begin test -f foo.txt + and test -r foo.txt + end + echo "foo.txt exists and is readable" +end +\endfish -- cgit v1.2.3