From a02d4dc27cea0d89fd4c7aea3c65e9d7c06cf52c Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 15 Sep 2015 17:04:49 +0200 Subject: Document cross-product At least in tutorial for now. Fixes #2341 --- doc_src/tutorial.hdr | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc_src') diff --git a/doc_src/tutorial.hdr b/doc_src/tutorial.hdr index 74d48ec4..829e13e9 100644 --- a/doc_src/tutorial.hdr +++ b/doc_src/tutorial.hdr @@ -348,6 +348,13 @@ You can iterate over a list (or a slice) with a for loop: entry: /usr/local/bin \endfish +If you append a list to a string (or to a list), it will build the cross-product: +\fish{cli-dark} +>_ set -l a 1 2 3 +>_ set -l 1 a b c +>_ echo $a$1 +1a 2a 3a 1b 2b 3b 1c 2c 3c +\endfish \section tut_command_substitutions Command Substitutions -- cgit v1.2.3