From 6ba8d6dc82f2b44734f5760225435642ae842725 Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Fri, 12 Aug 2022 14:27:03 +0200 Subject: [PATCH] add more examples on string interpolation --- doc/manual/src/language/index.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/manual/src/language/index.md b/doc/manual/src/language/index.md index 65463baa0..724484460 100644 --- a/doc/manual/src/language/index.md +++ b/doc/manual/src/language/index.md @@ -38,7 +38,7 @@ the rest. - `"Hello world"` + `"hello world"` A string @@ -58,10 +58,14 @@ the rest. + `"hello ${ { a = "world" }.a }"` + + `"1 2 ${3}"` + `"${pkgs.bash}/bin/sh"` - A string containing an expression (expands to `"/nix/store/-bash-/bin/sh"`) + String interpolation (expands to `"hello world"`, `"1 2 3"`, `"/nix/store/-bash-/bin/sh"`)