You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unexpected interpolation in argument for script #7936
When a non-interpolated string containing ( or () is passed to a nu script file, nu tries to interpolate it, if none of the parentheses are adjacent to or contain a whitespace or a (already escaped) backslash.
How to reproduce
"#!/usr/bin/env nu\ndef main [str] {echo $str}" | save test; chmod +x test
./test '(aaaa)' yields the external command failed error (assuming there is no real command called aaaa)
'(aa aa)', '( aaaa)', ' (aaaa)', '\(aaaa)' vel sim. are just printed
However, "(date\tnow)" will print like $"(date now)"
Expected behavior
I expect nu to treat these strings in accordance with the expected behavior as documented
Screenshots
Since ($env.config) didn't print the config record, it probably is a problem in the nu process that runs the script, not the shell
Activity
weirdan commentedon Aug 15, 2024
This no longer happens: