diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-06-04 13:16:28 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-06-04 13:16:28 +0200 |
commit | f85606c431dc1225ba32ecefaa4aea1eb6d4356e (patch) | |
tree | c11a7261d8b58bc1528e1b221a741353d6a4a04a /src/libutil/args.cc | |
parent | 81cafda306e7257d0d77a20b9bde45049abaa52a (diff) | |
parent | 0f44b60e6dc999697bf9f2a4b3652a0551016598 (diff) |
Merge remote-tracking branch 'origin/master' into flakes
Diffstat (limited to 'src/libutil/args.cc')
-rw-r--r-- | src/libutil/args.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libutil/args.cc b/src/libutil/args.cc index 8667bd450..24b8ca66b 100644 --- a/src/libutil/args.cc +++ b/src/libutil/args.cc @@ -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)) |