Unlike for any of the other shells, we were escaping $ when using tcsh.
There's nothing special about $ in tcsh and this prevents you from
expanding shell variables, one of the main reasons this functionality
exists in the first place.
Details
Details
- Reviewers
jingham - Commits
- rGacc56e55feee: [lldb] Expand $ when using tcsh
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
tcsh is different from the other shells in that a non-existent variable is trapped by the shell, and an error produced BEFORE running the command, whereas in other shells it just gets passed raw. So we should make sure that passing a non-existent shell variable produces a reasonable error. At present it sort of does:
(lldb) process launch --shell=tcsh -- $PWD $NO_SUCH_SHELL_VARIABLE NO_SUCH_SHELL_VARIABLE: Undefined variable. error: process exited with status 1 'r' and 'run' are aliases that default to launching through a shell. Try launching without going through a shell by using 'process launch'. (lldb)
The advisory part of that message is a little bogus, but that's a separate issue. Erroring out seems reasonable since that's actually what tcsh would have done with these arguments, and we seem in a fine state to try again.
It might be nice to have a test where we pass a bad variable and make sure that the error stays reasonable? But that's on the nice to have side...