Skip to content

nu -c "echo \"foo bar\"" fails when run inside nushell #5383

Closed

Description

@uasi

Describe the bug

〉nu -c "echo \"foo bar\""
Error: nu::parser::unexpected_eof (https://docs.rs/nu-parser/0.61.0/nu_parser/enum.ParseError.html#variant.UnexpectedEof)

  × Unexpected end of code.
   ╭─[source:1:1]
 1 │ echo \"foo bar\"
   ·                 ▲
   ·                 ╰── expected closing "
   ╰────

It works outside of nushell:

bash-3.2$ nu -c "echo \"foo bar\""
foo bar

Other builtin commands parse escaped double quotes without problem:

〉echo "echo \"foo bar\""
echo "foo bar"

How to reproduce

Run nu -c "echo \"foo bar\"" inside nushell.

Expected behavior

〉nu -c "echo \"foo bar\""
foo bar

Screenshots

No response

Configuration

key value
version 0.61.0
branch
tag
build_os macos-x86_64
rust_version rustc 1.59.0
cargo_version cargo 1.59.0
pkg_version 0.61.0
build_time 2022-04-12 20:38:15 +00:00
build_rust_channel release
features dataframe, default, trash, which, zip
installed_plugins

Additional context

No response

Activity

  1. sophiajt commented on May 1, 2022

    @sophiajt
    Contributor

    this should now be fixed

  2. added this to the v0.62.0 milestone on May 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions