aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/args.hh
AgeCommit message (Collapse)Author
2022-07-11Fix flake input completion for `InstallablesCommand`sNaïm Favier
Defers completion of flake inputs until the whole command line is parsed so that we know what flakes we need to complete the inputs of. Previously, `nix build flake --update-input <Tab>` always behaved like `nix build . --update-input <Tab>`.
2022-05-31repl: `--option pure-eval true` actually enables pure eval modeMaximilian Bosch
To quote Eelco in #5867: > Unfortunately we can't do > > evalSettings.pureEval.setDefault(false); > > because then we have to do the same in main.cc (where > pureEval is set to true), and that would allow pure-eval > to be disabled globally from nix.conf. Instead, a command should specify that it should be impure by default. Then, `evalSettings.pureEval` will be set to `false;` unless it's overridden by e.g. a CLI flag. In that case it's IMHO OK to be (theoretically) able to override `pure-eval` via `nix.conf` because it doesn't have an effect on commands where `forceImpureByDefault` returns `false` (i.e. everything where pure eval actually matters). Closes #5867
2022-02-25Remove std::string alias (for real this time)Eelco Dolstra
Also use std::string_view in a few more places.
2021-12-22Don't insert spaces when completing attribute pathsNaïm Favier
2021-09-14Add "nix profile rollback" commandEelco Dolstra
2021-09-13nix --help: Display help using lowdown instead of manEelco Dolstra
Fixes #4476. Fixes #5231.
2021-02-26nix flake update: Recreate the lock fileEelco Dolstra
This is probably what most people expect it to do. Fixes #3781. There is a new command 'nix flake lock' that has the old behaviour of 'nix flake update', i.e. it just adds missing lock file entries unless overriden using --update-input.
2021-02-24Initialize plugins after handling initial command line flagsShea Levy
This is technically a breaking change, since attempting to set plugin files after the first non-flag argument will now throw an error. This is acceptable given the relative lack of stability in a plugin interface and the need to tie the knot somewhere once plugins can actually define new subcommands.
2021-02-07Support --no-net for backwards compatibilityEelco Dolstra
2021-01-27Remove mkFlag()Eelco Dolstra
2021-01-25Group common optionsEelco Dolstra
2021-01-25Make '--help' do the same as 'help' (i.e. show a manpage)Eelco Dolstra
2021-01-08Support binary unit prefixes in command line argumentsEelco Dolstra
2021-01-08string2Int(): Return std::optionalEelco Dolstra
2021-01-08Remove unused mkFlag1Eelco Dolstra
2021-01-08Remove mkFlag integer specialisationEelco Dolstra
2021-01-08Remove mkIntFlagEelco Dolstra
2020-12-23Command: Remove examples()Eelco Dolstra
2020-12-21Move doc() to ArgsEelco Dolstra
2020-12-03Add deprecated aliases for renamed commandsEelco Dolstra
2020-10-09Add a description in the completion outputsregnat
Make nix output completions in the form `completion\tdescription`. This can't be used by bash (afaik), but other shells like zsh or fish can display it along the completion choices
2020-09-25expectArg(): Respect the 'optional' flagEelco Dolstra
2020-08-20Allow 'nix' subcommands to provide docs in Markdown formatEelco Dolstra
2020-08-17Add 'nix dump-args' to dump all commands/flags for manpage generationEelco Dolstra
2020-06-26Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-18Revert the `enum struct` changeJohn Ericson
Not a regular git revert as there have been many merges and things.
2020-06-18Merge branch 'enum-class' into no-hash-type-unknownJohn Ericson
2020-06-18Merge remote-tracking branch 'upstream/master' into enum-classJohn Ericson
2020-06-08Add completion for --update-inputEelco Dolstra
2020-06-04Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-04Make 'nix dev-shell' a deprecated alias for 'nix develop'Eelco Dolstra
2020-06-02Fix to-base --type handler to correctly set std::optional flagJohn Ericson
Now that we have a separate flag function, also describe why it is optional.
2020-05-28Merge branch 'master' of github.com:NixOS/nix into enum-classCarlo Nucera
2020-05-11When completing flakerefs, only return directoriesEelco Dolstra
2020-05-11CleanupEelco Dolstra
2020-05-10Add completion for pathsEelco Dolstra
2020-05-10nix: Implement basic bash completionEelco Dolstra
2020-05-05nix --help: Group commandsEelco Dolstra
2020-05-04Flag: Use designated initializersEelco Dolstra
2020-03-29Use `enum struct` and drop prefixesJohn Ericson
This does a few enums; the rest will be gotten in subsequent commits.
2019-12-05Initialize Command::_nameEelco Dolstra
(cherry picked from commit d0a769cb061a13ad880c76e5ea69a76150439853)
2019-12-05Make subcommand construction in MultiCommand lazyEelco Dolstra
(cherry picked from commit a0de58f471c9087d8e6cc60a6078f9940a125b15)
2019-12-05Move Command and MultiCommand to libutilEelco Dolstra
(cherry picked from commit f70434b1fbbdb0e188718f0c55a8156a7aa08744)
2019-11-10Remove unneeded semicolonsJohn Ericson
2017-10-24nix: Respect -I, --arg, --argstrEelco Dolstra
Also, random cleanup to argument handling.
2017-09-25DohEelco Dolstra
2017-09-14Add "nix add-to-store" commandEelco Dolstra
2017-09-06nix build: Add --out-link and --no-link optionsEelco Dolstra
2017-08-29nix run: Allow passing a command to executeEelco Dolstra
E.g. nix run nixpkgs.hello -c hello --greeting Hallo Note that unlike "nix-shell --command", no quoting of arguments is necessary. "-c" (short for "--command") cannot be combined with "--" because they both consume all remaining arguments. But since installables shouldn't start with a dash, this is unlikely to cause problems.
2017-07-30Replace Unicode quotes in user-facing strings by ASCIIJörg Thalheim
Relevant RFC: NixOS/rfcs#4 $ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g"