diff --git a/source/hello-flake/main.adoc0 b/source/hello-flake/main.adoc0 index 8f46a58..718bcb4 100644 --- a/source/hello-flake/main.adoc0 +++ b/source/hello-flake/main.adoc0 @@ -41,9 +41,9 @@ Once we exit that shell, the `hello-flake` command is no longer directly available. .... -$# echo '$ exit' -$# echo '$ hello-flake' -sh: line 3: hello-flake: command not found +$# echo executable=$(which hello-flake) > temp.sh # save variable +$ exit +$ hello-flake # Won't work outside development shell .... However, we can still run the command using the store path we found @@ -51,7 +51,8 @@ earlier. That's not particularly convenient, but it does demonstrate that the package remains in the store for future use. .... -$# executable=$(which hello-flake) +$# source temp.sh # restore variable +$# rm temp.sh $# echo '$ '${executable} $# ${executable} .... diff --git a/source/nix-language/argument-sets.adoc b/source/nix-language/argument-sets.adoc index 4416023..3c42b71 100644 --- a/source/nix-language/argument-sets.adoc +++ b/source/nix-language/argument-sets.adoc @@ -9,7 +9,10 @@ An attribute set that is used as a function parameter is often called an _argume To specify an attribute set as a function parameter, we use a _set pattern_, which has the form - { _name1_, _name2_, ... } +[source,subs=quotes] +---- +{ _name1_, _name2_, ... } +---- Note that while the key-value associations in attribute sets are separated by semi-colons, the key names in the attribute set _pattern are separated by commas. diff --git a/source/nix-language/numbers.adoc b/source/nix-language/numbers.adoc index d44cc91..b9f7a86 100644 --- a/source/nix-language/numbers.adoc +++ b/source/nix-language/numbers.adoc @@ -44,7 +44,8 @@ a path .... If an expression can be interpreted as a path, Nix will do so. -This is useful, because paths are _far_ more commonly used in Nix expressions that arithmetic operators. +This is useful, because paths are _far_ more commonly used in Nix expressions +than arithmetic operators. In this case, Nix interpreted `6/2` as a relative path from the current directory, which in the above example was `/home/amy/codeberg/nix-book`.