aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/args.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-06-04 13:16:28 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-06-04 13:16:28 +0200
commitf85606c431dc1225ba32ecefaa4aea1eb6d4356e (patch)
treec11a7261d8b58bc1528e1b221a741353d6a4a04a /src/libutil/args.cc
parent81cafda306e7257d0d77a20b9bde45049abaa52a (diff)
parent0f44b60e6dc999697bf9f2a4b3652a0551016598 (diff)
Merge remote-tracking branch 'origin/master' into flakes
Diffstat (limited to 'src/libutil/args.cc')
-rw-r--r--src/libutil/args.cc4
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))