1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-11 04:56:01 +01:00

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
This commit is contained in:
regnat 2020-10-09 09:39:51 +02:00
parent 58dadf2954
commit 04e5d0e704
6 changed files with 42 additions and 20 deletions

View file

@ -44,7 +44,7 @@ MixCommonArgs::MixCommonArgs(const string & programName)
globalConfig.getSettings(settings);
for (auto & s : settings)
if (hasPrefix(s.first, prefix))
completions->insert(s.first);
completions->add(s.first, s.second.description);
}
}
});