diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-12-22 17:55:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-22 17:55:05 +0100 |
commit | b666a2ca8c99a35ebab07ef86f4f6e01c278a30f (patch) | |
tree | 667e5793204ad6e179211d06eac8a7545575e90a /src/nix | |
parent | ddd78391547be5f34f4042fd48124c0ced1f33b2 (diff) | |
parent | c4a03bc4ae7ac89dfca3ada27d1a7946d568d4d3 (diff) |
Merge pull request #5820 from ncfavier/completion-nospace
Don't insert spaces when completing attribute paths
Diffstat (limited to 'src/nix')
-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"; } |