[Lldb-commits] [lldb] [lldb] Treat user aliases the same as built-ins when tab completing (PR #65974)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 12 05:17:54 PDT 2023


================
@@ -20,7 +20,7 @@ def test_command_abbreviations_and_aliases(self):
         self.assertTrue(result.Succeeded())
         self.assertEqual("apropos script", result.GetOutput())
 
-        command_interpreter.ResolveCommand("h", result)
+        command_interpreter.ResolveCommand("he", result)
----------------
DavidSpickett wrote:

I figured it out. Previously, when you start with "h":
* exact match commands - fails
* exact match aliases - fails
* inexact match commands - succeeds

And we would skip looking in the aliases for an inexact match. That's why "history" never shows up.

Now I'm treating aliases and commands on the same level, when the inexact match is looked for both show up.

I've added an explicit alias h -> help to fix this, and restored the test to what it was.

https://github.com/llvm/llvm-project/pull/65974


More information about the lldb-commits mailing list