diff options
author | Naïm Favier <n@monade.li> | 2021-12-22 12:37:59 +0100 |
---|---|---|
committer | Naïm Favier <n@monade.li> | 2021-12-22 16:17:01 +0100 |
commit | 1da1b2b345ccf32220a2628622ee8b170d9d521a (patch) | |
tree | 800a607ba075453c97525994a510fa1e1e4c6efc /src/nix/main.cc | |
parent | 6e6e998930f0d7361d64644eb37d9134e74e8501 (diff) |
Don't insert spaces when completing attribute paths
Diffstat (limited to 'src/nix/main.cc')
-rw-r--r-- | src/nix/main.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/nix/main.cc b/src/nix/main.cc index 60b0aa410..759118fd5 100644 --- a/src/nix/main.cc +++ b/src/nix/main.cc @@ -310,7 +310,14 @@ void mainWrapped(int argc, char * * argv) Finally printCompletions([&]() { if (completions) { - std::cout << (pathCompletions ? "filenames\n" : "no-filenames\n"); + switch (completionType) { + case ctNormal: + std::cout << "normal\n"; break; + case ctFilenames: + std::cout << "filenames\n"; break; + case ctAttrs: + std::cout << "attrs\n"; break; + } for (auto & s : *completions) std::cout << s.completion << "\t" << s.description << "\n"; } |