Skip to content

Parse Error for quoted arguments in non-nushell programs #953

Closed

Description

@notryanb

Describe the bug
When running a non-nu command that has argument values surrounded by quotes, a Parse error
is raised.

To Reproduce
git log --pretty="%h %cn - %cd"

Expected behavior
Output of the git command using the formatter
ex.

9d34ec9 GitHub - Thu Oct 31 09:30:30 2019 +1300
fd92271 GitHub - Thu Oct 31 09:14:47 2019 +1300
2d44b7d GitHub - Wed Oct 30 20:22:01 2019 +1300
faccb06 GitHub - Wed Oct 30 20:20:06 2019 +1300
a9cd6b4 Jonathan Turner - Wed Oct 30 20:04:39 2019 +1300

Error Output

D:\Programming\Rust\nushell(master)> git log --pretty="%h %cn - %cd"
error: Parse Error
- shell:1:17
1 | git log --pretty="%h %cn - %cd"
  |                  ^^^^^^^^^^^^^^

Configuration (please complete the following information):

  • OS: Windows
  • Nu: 0.5.0
  • All Features

Activity

  1. arnaldo2792 commented on Nov 20, 2019

    @arnaldo2792

    I had the same problem, but with find:

    To Reproduce:

    find . -type f -maxdepth 2 -exec echo "{}" \;
    

    Expected behavior:
    It should echo the files returned by the find command

    Error Output:

    error: Parse Error
    - shell:1:44
    1 | find . -type f -maxdepth 2 -exec echo "{}" \;
      |                                             ^

    Configuration (please complete the following information):

    • OS: OSX
    • Nu: 0.5.1
    • All Features
  2. sophiajt commented on Apr 12, 2020

    @sophiajt
    Contributor

    This should be fixed in master with the latest parser changes. If you can still repro, please re-open.

  3. added a commit that references this issue on Feb 7, 2022
  4. added a commit that references this issue on Feb 7, 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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions