fix unknown_command when parsing certain strings with equal signs#14053
Merged
fdncred merged 1 commit intonushell:mainfrom Oct 11, 2024
sgvictorino:parse-strings-with-equals
Merged
fix unknown_command when parsing certain strings with equal signs#14053fdncred merged 1 commit intonushell:mainfrom sgvictorino:parse-strings-with-equals
fdncred merged 1 commit intonushell:mainfrom
sgvictorino:parse-strings-with-equals
Conversation
Contributor
|
wow, thanks! this closes a good amount of issues. although, i'm not sure it closes #6853 since that still fails with this pr with unknow command, but maybe it's supposed to? there's also some examples that don't work in #9879 but i think that's right too. but the rest seem great. I wonder if you'd be up to adding more tests, specifically ones from #9879 ? Some that work and some that don't work so we can be sure we don't regress. |
Contributor
Author
# Description Prevents errors when `=` is used in: - strings in lists/records with a symbol adjacent to the quotes - raw strings ``` > ["=a"] Error: nu::parser::unknown_command × Unknown command. ╭─[entry #9:1:1] 1 │ ["=a"] · ───┬── · ╰── unknown command ╰──── ``` ``` > r#'=a'# Error: nu::parser::unknown_command × Unknown command. ╭─[entry #5:1:1] 1 │ r#'=a'# · ───┬─── · ╰── unknown command ╰──── ``` # User-Facing Changes Variable names in env shorthand assignments must satisfy `is_identifier`.
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Prevents errors when
=is used before the end of:Closes #13902, closes #13901, closes #9879, closes #6401, closes #5806
User-Facing Changes
Variable names in environment shorthand assignments must satisfy
is_identifier.