diff options
author | Dave Lee <davelee.com@gmail.com> | 2024-11-07 11:24:00 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-07 11:24:00 -0800 |
commit | 60e3a81c4299baf80e7b80db9cb8368223ee9546 (patch) | |
tree | 5936d4e609828d1f67df93980d4a2f4f0209d931 /lldb/source/Interpreter/CommandInterpreter.cpp | |
parent | 200afcf6128911892d61c2a331186fe9a4da2a3e (diff) | |
download | llvm-60e3a81c4299baf80e7b80db9cb8368223ee9546.zip llvm-60e3a81c4299baf80e7b80db9cb8368223ee9546.tar.gz llvm-60e3a81c4299baf80e7b80db9cb8368223ee9546.tar.bz2 |
[lldb] Add builtin e alias for expression (#115359)
The changes in 461f859a72 (llvm/llvm-project#65974) resulted in a change
in behavior not just for completion, but also for selection of inexect
commands.
Since many use `e` to mean `expression`, this change adds an alias for
`e`. Note that the referenced change similarly aliases `h` to `help`.
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index c990972..227ed80 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -441,6 +441,8 @@ void CommandInterpreter::Initialize() { cmd_obj_sp = GetCommandSPExact("expression"); if (cmd_obj_sp) { + // Ensure `e` runs `expression`. + AddAlias("e", cmd_obj_sp); AddAlias("call", cmd_obj_sp, "--")->SetHelpLong(""); CommandAlias *parray_alias = AddAlias("parray", cmd_obj_sp, "--element-count %1 --"); |