mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-09 01:29:52 +00:00
[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:
parent
c1e2c5340b
commit
e5f7d601ee
@ -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,
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user