roysc wrote:

As things stand, there seems to be no way for zsh users to pass literal `*` or 
`?` via lldb's default launch, which is a usability problem with a non-obvious 
cause.

The options I see:

1. Default to `-X false` for CLI args: Arguments passed via `lldb prog -- args` 
have already been shell-expanded. Expanding them again is redundant and causes 
this bug. Shell expansion could remain enabled by default for args set within 
lldb's REPL, where it might actually be useful.
2. Escape glob characters: Effectively disables glob expansion for `*?[]`. 
Users who want expansion can use `process launch -X true`. This inverts the 
current default but is more predictable.
3. Escape only for zsh/fish/tcsh: These shells error on unmatched globs; 
bash/sh don't. Inconsistent, but preserves existing behavior where it works.
4. Better error message: At minimum, when argdumper fails, suggest `-X false` 
instead of the cryptic "shell expansion failed."

I'd prefer (1), then (2). Shell expansion on already-expanded CLI args is more 
footgun than feature.

https://github.com/llvm/llvm-project/pull/112107
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to