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
Unusual parsing of equal signs followed by a char as part of strings in a dictionary without spaces #9879
The ast parsing somehow often thinks that a = followed by a char in a string of a dictionary, which dosnt contain spaces, makes the entire dictionary a command.
How to reproduce
These examples produce Error: nu::parser::unknown_command:
{"":"=a"}
{"=a":""}
{"foo":"=foo"}
{"":"=a","":""}
These similar examples parse correctly:
{"":""}
{"":"="}
{"": "="}
{"foo":"foo"}
{"":" ="}
{"":"=a", "":""}
{"":"=a","": ""}
{"":"=a","":" "}
{"":"foobar="}
Expected behavior
all of those should be dictionaries
Screenshots
No response
Configuration
key
value
version
0.83.0
branch
commit_hash
build_os
linux-x86_64
build_target
x86_64-unknown-linux-gnu
rust_version
rustc 1.70.0 (90c541806 2023-05-31) (built from a source tarball)
Activity
sophiajt commentedon Aug 9, 2023
Looking more closely, the ones that reuse the field name would continue to be errors.
I'm not able to reproduce errors for some of these.
For example:
and
Can you try your examples again against the latest version of nushell from main and see how many still reproduce errors?
sophiajt commentedon Aug 9, 2023
Updated the description.
hugosenari commentedon Jun 21, 2024
Tested with 0.94.1
Still failing
And
["=a"]fails but["= a"]and"=a"don'tMaybe this is a duplacation of #5806 #6401 and related to #4890 #6853
fix unknown_command when parsing certain strings with equal signs (nu…