diff options
author | regnat <rg@regnat.ovh> | 2020-10-09 09:39:51 +0200 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2020-10-09 09:39:51 +0200 |
commit | 04e5d0e7040fdfbbc084634c0694ae7da89765d9 (patch) | |
tree | 23942b5586c03d62322989a88178237e104da00a /src/nix/main.cc | |
parent | 58dadf295499588e492dab6bdc5934dc27ad3e64 (diff) |
Add a description in the completion outputs
Make nix output completions in the form `completion\tdescription`.
This can't be used by bash (afaik), but other shells like zsh or fish
can display it along the completion choices
Diffstat (limited to 'src/nix/main.cc')
-rw-r--r-- | src/nix/main.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix/main.cc b/src/nix/main.cc index 1e9e07bc0..5056ceb78 100644 --- a/src/nix/main.cc +++ b/src/nix/main.cc @@ -208,7 +208,7 @@ void mainWrapped(int argc, char * * argv) if (completions) { std::cout << (pathCompletions ? "filenames\n" : "no-filenames\n"); for (auto & s : *completions) - std::cout << s << "\n"; + std::cout << s.completion << "\t" << s.description << "\n"; } }); |