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
Backtick strings cannot contain non-whitespace characters followed by = (?!) #6853
It seems that adding = to certain backtick strings causes them to no longer be parsed correctly. I pored over a few commits related to backtick strings, but I still don't understand what the heck is up with this.
This is a weird one. I spent 10 min digging into it but couldn't find an obvious cause. Most likely a bug in the parser, which has several special cases for '=' characters.
The reason for this issue is the ENV=value command syntax. Nushell interprets ["=a"] as $env '["' = 'a"]'. Thus, things like ["=a"] printenv work, while a=b gives the same error.
Fixed by #14053.
Backtick strings containing = work as arguments, list items and record values now.
At the start of a line a backtick word is treated as a command name, so that case tries to run it, which i think is by design.
Activity
rgwood commentedon Oct 23, 2022
This is a weird one. I spent 10 min digging into it but couldn't find an obvious cause. Most likely a bug in the parser, which has several special cases for
'='characters.merelymyself commentedon Oct 23, 2022
Maybe relevant: #6401
rgwood commentedon Oct 23, 2022
Also likely relevant: #5806
kaathewisegit commentedon Nov 21, 2023
The reason for this issue is the
ENV=value commandsyntax. Nushell interprets["=a"]as$env '["' = 'a"]'. Thus, things like["=a"] printenvwork, whilea=bgives the same error.kronberger-droid commentedon Nov 13, 2026
Fixed by #14053.
Backtick strings containing
=work as arguments, list items and record values now.At the start of a line a backtick word is treated as a command name, so that case tries to run it, which i think is by design.