jimingham wrote: > > IIUC, you are adding a new rule that if an incoming command name has > > partial matches to one user command and one alias command, the user command > > is preferred over the alias command. Is that right? > > Yes. > > > You certainly should document that rule somewhere - maybe in the Tutorial > > section of the docs? Maybe in the help for `command alias`. And there > > should certainly be an explicit test to show this ordering - you can just > > use the script/scripting since that's what you added this for. > > Indeed, I should document that. > > > But I think I'm missing something, because I don't see how this solves the > > problem you set out to solve. You wanted to add the alias `script` to point > > to `scripting run`, and make `sc`, `scr`, etc also mean your alias. > > However, if I'm following your logic correctly, if I type `scr` then that > > matches the Alias command `script` -> `scripting run` and the user command > > `scripting`. By the logic in your path, it will choose the user command > > `scripting` not the alias, which I think is the opposite of what you wanted. > > I must be missing something. > > Right, but I think commands added explicitly by the user, that overwrite > other commands (or multiword commands in the `scripting` example), should > have priority over the lldb defined commands and aliases.
I'm not sure I agree with this. If I'm used to typing `br` for break, and then someone adds `brogue` (speaks the result of an expression in a Scottish accent?) I would be very surprised if `br` started meaning `brogue`. It would be much better to tell me there was now a conflict, and I can figure out what I want to do about it. However, aliases are going to be the way I resolve this issue for myself (by adding an alias for `br` that goes to `break`, for instance. So it seems okay, if well explained, to have aliases silently win over built-in and user commands, I don't think it's a good idea for user commands to do so over built-in commands. https://github.com/llvm/llvm-project/pull/101934 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits