Skip to content

Parser registers table declaration as command #6401

@merelymyself

Description

@merelymyself

Describe the bug

~/CodingProjects/nushell〉{"=$": a}                                           08/24/2022 10:43:43 PM
Error: nu::parser::unknown_command (link)

  × Unknown command.
   ╭─[entry #12:1:1]
 1 │ {"=$": a}
   · ────┬────
   ·     ╰── unknown command
   ╰────

How to reproduce

  1. See above

Expected behavior

I expect nu to register this as a legitimate table, like this:

~/CodingProjects/nushell〉let a = "=$"; {$a: a}                               08/24/2022 10:43:36 PM
╭────┬───╮
│ =$ │ a │
╰────┴───╯

Screenshots

No response

Configuration

key value
version 0.67.1
branch patch-to-nuon
commit_hash ba07224
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.61.0 (fe5b13d68 2022-05-18)
rust_channel 1.61.0-x86_64-unknown-linux-gnu
cargo_version cargo 1.61.0 (a028ae4 2022-04-29)
pkg_version 0.67.1
build_time 2022-08-21 12:07:34 +08:00
build_rust_channel debug
features default, trash, which, zip
installed_plugins

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:parserIssues related to parsing

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions