Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sh syntax highlight breaks on "${*//\${/x}": everything after becomes shDoubleQuote or shDerefPPSleft #5085

Open
chkno opened this issue Oct 18, 2019 · 0 comments
Labels

Comments

@chkno
Copy link

@chkno chkno commented Oct 18, 2019

sh syntax highlighting treats \${ as introducing a parameter expansion when inside ${var// .... /}, but bash does not -- bash sees the \ as escaping the $. Both / (substitute first) and // (substitute all) are affected.

To Reproduce

  1. Edit this file with syntax highlighting on:
#!/usr/bin/bash

echo "${1//\${/dollar curly}"
echo "The rest of this file is shDerefPPSleft inside double quotes"
echo and shDoubleQuote _outside_ double quotes

Screenshots
stuck-in-shDerefPPSleft

Environment (please complete the following information):

Additional context
Maintainer: @cecamp

@k-takata k-takata added the runtime label Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.