about summary refs log tree commit diff
path: root/nix/nix-1p
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-11-25T12·41+0100
committerVincent Ambo <tazjin@google.com>2020-11-25T12·41+0100
commitd28d30477a36bb51d797058b9579b105a5168c25 (patch)
tree759967c6dd6d26ac92ad5418315d21d4c48086df /nix/nix-1p
parent3236b7ff284383a66df114277c0dccc09dce3e73 (diff)
Note that `or` works for nested attribute access
Diffstat (limited to 'nix/nix-1p')
-rw-r--r--nix/nix-1p/README.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/nix/nix-1p/README.md b/nix/nix-1p/README.md
index 0399bc41cd2d..c8f4b328fa18 100644
--- a/nix/nix-1p/README.md
+++ b/nix/nix-1p/README.md
@@ -348,7 +348,7 @@ in set.a or 23
 Since the attribute `a` exists, this will return `42`.
 
 
-```
+```nix
 # ... or fall back to a default if there is no such key
 let set = { };
 in set.a or 23
@@ -357,6 +357,8 @@ in set.a or 23
 Since the attribute `a` does not exist, this will fall back to returning the
 default value `23`.
 
+Note that `or` expressions also work for nested attribute set access.
+
 # Standard libraries
 
 Yes, libraries, plural.