[Alias] Add 're' alias for register

This patch makes `re` an alias for `register`. Currently `re<TAB>` gives
you the choice between `register` and `reproducer`. Given that you use
`register` a lot more often, it should win for the common substring.

Differential revision: https://reviews.llvm.org/D61469

llvm-svn: 359927
This commit is contained in:
Jonas Devlieghere 2019-05-03 20:37:09 +00:00
parent c1e2c5340b
commit e5f7d601ee
2 changed files with 7 additions and 1 deletions

View File

@ -187,7 +187,8 @@ class RegisterCommandsTestCase(TestBase):
elif not value.IsValid():
return # If register doesn't exist, skip this test
self.runCmd("register write " + register + " \'" + new_value + "\'")
# Also test the 're' alias.
self.runCmd("re write " + register + " \'" + new_value + "\'")
self.expect(
"register read " +
register,

View File

@ -429,6 +429,11 @@ void CommandInterpreter::Initialize() {
AddAlias("var", cmd_obj_sp);
AddAlias("vo", cmd_obj_sp, "--object-description");
}
cmd_obj_sp = GetCommandSPExact("register", false);
if (cmd_obj_sp) {
AddAlias("re", cmd_obj_sp);
}
}
void CommandInterpreter::Clear() {