From 6612f3e2768cdb029b89f538457c05c4cd3c7f24 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 4 Jul 2009 14:33:44 -0400 Subject: [PATCH] Enhancement - aliases - Implemented command aliases. --- src/Cmd.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Cmd.cpp b/src/Cmd.cpp index 9e7d13d03..b3bb1137d 100644 --- a/src/Cmd.cpp +++ b/src/Cmd.cpp @@ -61,7 +61,7 @@ bool Cmd::valid (const std::string& input) load (); std::vector matches; - autoComplete (lowerCase (input), commands, matches); + autoComplete (lowerCase (context.canonicalize (input)), commands, matches); return matches.size () == 1 ? true : false; } @@ -72,7 +72,7 @@ bool Cmd::validCustom (const std::string& input) load (); std::vector matches; - autoComplete (lowerCase (input), customReports, matches); + autoComplete (lowerCase (context.canonicalize (input)), customReports, matches); return matches.size () == 1 ? true : false; } @@ -81,7 +81,7 @@ void Cmd::parse (const std::string& input) { load (); - std::string candidate = lowerCase (input); + std::string candidate = lowerCase (context.canonicalize (input)); std::vector matches; autoComplete (candidate, commands, matches);