Skip to content

Command substitutions with nested parentheses are not escaped correctly #9

@steinybot

Description

@steinybot

Description

Command substitutions that contains nested parentheses (e.g. with a nested parameter expansion containing a flag) are not escaped correctly.

Versions

Component Version
Zsh Escape a04551a (git rev-parse HEAD)
OS Windows 10
Zsh zsh 5.5.1 (i686-pc-cygwin) (zsh --version)

Steps To Reproduce

Steps to reproduce the bug:

  1. Use the following file bad-script.zsh:
foo=$(print ${(qq)bar})
  1. Run:
zsh-escape.zsh fix bad-script.zsh

Expected Behaviour

foo="$(print ${(qq)bar})"

Actual Behaviour

foo="$(print ${(qq)"bar})

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions