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
I am getting tripped up multiple times a day by one single thing -- unquoted strings being treated as strings.
I really wish that nushell didn't coerce anything it doesn't recognize to a string.
let success = true
...
if success {
}
gives a string error. Passing gcrootsdir to a external-command just silently, when I'd really meant $gcrootsdir, which meant I'd silently been writing to the completely wrong directory.
Describe the solution you'd like
Nushell does not coerce unquoted strings to strings.
Granted, as I type that, I'm not really sure how that would be handled, given that random flags and arguments to external commands are indeed generally unquoted strings.
Describe alternatives you've considered
No response
Additional context and details
No response
The text was updated successfully, but these errors were encountered:
Right, but if success { ... } gives a "cannot convert string to bool" error. Which I've stared at a few times and gone... "no, it's not".
Maybe it would just be enough to have hints on errors. Like:
"Cannot convert string to bool (did you mean $success instead of success"
Given the external commands and "you're just doing it wrong", maybe there's no bug/feature here. But I've had this thought a few times and wanted to bring it up at least.
Related problem
I am getting tripped up multiple times a day by one single thing -- unquoted strings being treated as strings.
I really wish that nushell didn't coerce anything it doesn't recognize to a string.
gives a string error. Passing
gcrootsdir
to a external-command just silently, when I'd really meant$gcrootsdir
, which meant I'd silently been writing to the completely wrong directory.Describe the solution you'd like
Granted, as I type that, I'm not really sure how that would be handled, given that random flags and arguments to external commands are indeed generally unquoted strings.
Describe alternatives you've considered
No response
Additional context and details
No response
The text was updated successfully, but these errors were encountered: