================
@@ -518,6 +518,15 @@ void CommandInterpreter::Initialize() {
     AddAlias("re", cmd_obj_sp);
   }
 
+  cmd_obj_sp = GetCommandSPExact("scripting execute");
+  if (cmd_obj_sp) {
+    AddAlias("sc", cmd_obj_sp);
+    AddAlias("scr", cmd_obj_sp);
+    AddAlias("scri", cmd_obj_sp);
+    AddAlias("scrip", cmd_obj_sp);
+    AddAlias("script", cmd_obj_sp);
----------------
jimingham wrote:

The problem is that if we have the command `scripting` and the alias `script` 
and we see `sc` we need to resolve that command ambiguity.  The only tool we 
have for ambiguous command resolution at present is "exact matches always win".

If we wanted to solve this w/o making all the exact matches we intend to win, 
we could add a ranking system to the commands and aliases, which bias ambiguous 
matches in favor of one or the other of the commands, or some similar system.  
I worry that would get messy pretty quickly, but anyway, you'd need something 
like that.

https://github.com/llvm/llvm-project/pull/97263
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to