-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Backtick strings cannot contain non-whitespace characters followed by = (?!) #6853
Copy link
Copy link
Open
Labels
A:parserIssues related to parsingIssues related to parsing
Description
Describe the bug
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.
How to reproduce
C:\Coding\nushell.github.io〉`=`
Error: nu::parser::unknown_command (link)
× Unknown command.
╭─[entry #306:1:1]
1 │ `=`
· ─┬─
· ╰── unknown command
╰────
C:\Coding\nushell.github.io〉`a=`
Error: nu::parser::unknown_command (link)
× Unknown command.
╭─[entry #307:1:1]
1 │ `a=`
· ──┬─
· ╰── unknown command
╰────
C:\Coding\nushell.github.io〉` =`
=
C:\Coding\nushell.github.io〉`\=`
Error: nu::parser::unknown_command (link)
× Unknown command.
╭─[entry #309:1:1]
1 │ `\=`
· ──┬─
· ╰── unknown command
╰────
Expected behavior
Why do backtick strings have this strange exception? To me, they should just work as alternatives to single-quote strings.
Screenshots
No response
Configuration
| key | value |
|---|---|
| version | 0.70.0 |
| branch | |
| commit_hash | 9ef65dc |
| build_os | windows-x86_64 |
| build_target | x86_64-pc-windows-msvc |
| rust_version | rustc 1.64.0 (a55dd71d5 2022-09-19) |
| rust_channel | stable-x86_64-pc-windows-msvc |
| cargo_version | cargo 1.64.0 (387270bc7 2022-09-16) |
| pkg_version | 0.70.0 |
| build_time | 2022-10-18 18:55:02 +00:00 |
| build_rust_channel | release |
| features | database, dataframe, default, trash, which, zip |
| installed_plugins |
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A:parserIssues related to parsingIssues related to parsing