diff options
author | Naïm Favier <n@monade.li> | 2022-06-20 04:15:38 +0200 |
---|---|---|
committer | Naïm Favier <n@monade.li> | 2022-07-11 15:13:51 +0200 |
commit | 711b2e1f48316d80853635408c518e3562a1fa37 (patch) | |
tree | dcb298bf9a252344e8e7dd947a5d029e4e6e131d /src/nix/main.cc | |
parent | d6d0e781bbade76f6ea3f310cb36973f4013826d (diff) |
Fix flake input completion for `InstallablesCommand`s
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>`.
Diffstat (limited to 'src/nix/main.cc')
-rw-r--r-- | src/nix/main.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nix/main.cc b/src/nix/main.cc index f398e3118..f6138cbe6 100644 --- a/src/nix/main.cc +++ b/src/nix/main.cc @@ -342,7 +342,10 @@ void mainWrapped(int argc, char * * argv) if (!completions) throw; } - if (completions) return; + if (completions) { + args.completionHook(); + return; + } if (args.showVersion) { printVersion(programName); |