forked from lix-project/lix
Add shell completion for --override-flake
Requires moving the MixEvalArgs class from libexpr to libcmd because that's where completeFlakeRef is.
This commit is contained in:
parent
55c6906701
commit
da7d8daa77
|
@ -7,6 +7,7 @@
|
|||
#include "registry.hh"
|
||||
#include "flake/flakeref.hh"
|
||||
#include "store-api.hh"
|
||||
#include "command.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
@ -59,6 +60,9 @@ MixEvalArgs::MixEvalArgs()
|
|||
fetchers::Attrs extraAttrs;
|
||||
if (to.subdir != "") extraAttrs["dir"] = to.subdir;
|
||||
fetchers::overrideRegistry(from.input, to.input, extraAttrs);
|
||||
}},
|
||||
.completer = {[&](size_t, std::string_view prefix) {
|
||||
completeFlakeRef(openStore(), prefix);
|
||||
}}
|
||||
});
|
||||
|
Loading…
Reference in a new issue