Skip to content

[Nightly] Can't use parser keyword run as command name. #116

Description

@Paul-16098

nushell/nushell#18662

Error: nu::parser::name_is_keyword

  × Can't use parser keyword `run` as command name.
    ╭─[C:\Users\xxx\.config\nushell\nupm\modules\numd\commands.nu:19:12]
 16 │ @example "preview which blocks would execute, without running them" {
 17 │     numd run --dry-run README.md
 18 │ }
 19 │ export def run [
    ·            ─┬─
    ·             ╰── 'run' is a parser keyword
 20 │     file: path # path to a `.md` file containing Nushell code to be executed
 21 │     --dry-run # return blocks that would execute (block_index, infostring, code) without executing anything
 22 │     --echo # output resulting markdown to stdout instead of saving to file
    ╰────
  help: Parser keywords cannot be shadowed (including via module exports and `use *`). Choose a different command name so language constructs
        keep working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions