<div dir="ltr"><div><div><div><div>When doing command completion with multiple command matches you will see the commands twice. The best example of this bug is typing pl<tab><br><br>(lldb) pl<br>Available completions:<br>
platform<br> plugin<br> platform<br> plugin<br><br><br></div>with this patch you get the expected result:<br><br>(lldb) pl<br>Available completions:<br> platform<br> plugin<br><br><br></div>The fix works because once an exact match for a command and a command+aliases fails it just asks for any inexact matches from both commands and aliases rather than asking for any inexact commands (which returns a list of matches) and then any inexact commands and aliases (which adds the commands to the list again plus any aliases).<br>
<br></div>If this seems reasonable, please commit it for me. Thanks.<br></div><div><div><div><br><br>Index: source/Interpreter/CommandInterpreter.cpp<br>===================================================================<br>
--- source/Interpreter/CommandInterpreter.cpp (revision 183564)<br>+++ source/Interpreter/CommandInterpreter.cpp (working copy)<br>@@ -848,13 +848,7 @@<br> command_obj = GetCommandSP (cmd_cstr, true, true, matches).get();<br>
}<br> <br>- // If there wasn't an exact match among the aliases, look for an inexact match<br>- // in just the commands.<br>-<br>- if (command_obj == NULL)<br>- command_obj = GetCommandSP(cmd_cstr, false, false, matches).get();<br>
-<br>- // Finally, if there wasn't an inexact match among the commands, look for an inexact<br>+ // If there wasn't an exact match among the commands and aliases, look for an inexact<br> // match in both the commands and aliases.<br>
if (command_obj == NULL)<br> command_obj = GetCommandSP(cmd_cstr, true, false, matches).get();<br><br></div></div></div></div>