summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorDenis Isidoro <denisidoro@users.noreply.github.com>2020-08-14 13:53:23 -0300
committerGitHub <noreply@github.com>2020-08-14 13:53:23 -0300
commit657992b1737c94e8d95352673679b827c4702691 (patch)
treeef9b769f0d68424f293f02adaba1748173720c1c /README.md
parente11c48ec03e6c0528e92988ed6813652209dc294 (diff)
Allow implicit variable dependencies (#379)v2.8.0
* Allow implicit variable dependencies * Aug-14 12h01: core.rs, Cargo.toml, Cargo.lock * Aug-14 12h04: cases.cheat * Aug-14 12h08: cases.cheat
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index 9167cfd..3dc34f4 100644
--- a/README.md
+++ b/README.md
@@ -237,10 +237,22 @@ The command for generating possible inputs can refer previous variables:
# If you select "hello" for <x>, the possible values of <y> will be "hello foo" and "hello bar"
echo <x> <y>
+# If you want to ignore the contents of <x> and only print <y>
+: <x>; echo <y>
+
$ x: echo "hello hi" | tr ' ' '\n'
$ y: echo "$x foo;$x bar" | tr ';' '\n'
```
+If you want to have implicit variable dependency, you can use the `<varname>` syntax inside a variable command:
+```sh
+# Should print /my/pictures/wallpapers
+echo "<wallpaper_folder>"
+
+$ pictures_folder: echo "/my/pictures"
+$ wallpaper_folder: echo "<pictures_folder>/wallpapers"
+```
+
### Multiline snippets
Commands may be multiline: