forked from lix-project/lix
Accept multiple arguments to nix flake update
Change-Id: Ia7bd4f7640384be9827dbb7e2c594f0aa5f1aff8
This commit is contained in:
parent
93b7edfd07
commit
4879178a81
|
@ -87,11 +87,13 @@ public:
|
|||
expectArgs({
|
||||
.label="inputs",
|
||||
.optional=true,
|
||||
.handler={[&](std::string inputToUpdate){
|
||||
.handler={[&](std::vector<std::string> inputsToUpdate) {
|
||||
for (const auto & inputToUpdate : inputsToUpdate) {
|
||||
auto inputPath = flake::parseInputPath(inputToUpdate);
|
||||
if (lockFlags.inputUpdates.contains(inputPath))
|
||||
warn("Input '%s' was specified multiple times. You may have done this by accident.");
|
||||
warn("Input '%s' was specified multiple times. You may have done this by accident.", inputToUpdate);
|
||||
lockFlags.inputUpdates.insert(inputPath);
|
||||
}
|
||||
}},
|
||||
.completer = {[&](AddCompletions & completions, size_t, std::string_view prefix) {
|
||||
completeFlakeInputPath(completions, getEvalState(), getFlakeRefsForCompletion(), prefix);
|
||||
|
|
Loading…
Reference in a new issue