1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 16:51:15 +02:00

nix: Add --expr flag

This replaces the '(...)' installable syntax, which is not very
discoverable. The downside is that you can't have multiple expressions
or mix expressions and other installables.
This commit is contained in:
Eelco Dolstra 2019-11-27 00:05:30 +01:00
parent 2c6dbcd5e7
commit ca8caaec5e
9 changed files with 86 additions and 76 deletions

View file

@ -28,7 +28,7 @@ struct CmdEval : MixJSON, InstallableCommand
return {
Example{
"To evaluate a Nix expression given on the command line:",
"nix eval '(1 + 2)'"
"nix eval --expr '1 + 2'"
},
Example{
"To evaluate a Nix expression from a file or URI:",