diff options
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r-- | docs/markdown/snippets/environment.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/markdown/snippets/environment.md b/docs/markdown/snippets/environment.md new file mode 100644 index 0000000..1ed102d --- /dev/null +++ b/docs/markdown/snippets/environment.md @@ -0,0 +1,16 @@ +## Multiple append() and prepend() in `environment()` object + +`append()` and `prepend()` methods can now be called multiple times +on the same `varname`. Earlier Meson versions would warn and only the last +opperation was taking effect. + +```meson +env = environment() + +# MY_PATH will be '0:1:2:3' +env.set('MY_PATH', '1') +env.append('MY_PATH', '2') +env.append('MY_PATH', '3') +env.prepend('MY_PATH', '0') +``` + |