1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 17:51:15 +02:00

Merge remote-tracking branch 'origin/master' into flakes

This commit is contained in:
Eelco Dolstra 2020-06-04 13:16:28 +02:00
commit f85606c431
6 changed files with 18 additions and 11 deletions

View file

@ -303,6 +303,10 @@ MultiCommand::MultiCommand(const Commands & commands)
.optional = true,
.handler = {[=](std::string s) {
assert(!command);
if (auto alias = get(deprecatedAliases, s)) {
warn("'%s' is a deprecated alias for '%s'", s, *alias);
s = *alias;
}
if (auto prefix = needsCompletion(s)) {
for (auto & [name, command] : commands)
if (hasPrefix(name, *prefix))