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

[REQUEST] sh filetype quotation highlighting of subshells #5228

Open
thoughtpatterns opened this issue Sep 5, 2024 · 0 comments
Open

[REQUEST] sh filetype quotation highlighting of subshells #5228

thoughtpatterns opened this issue Sep 5, 2024 · 0 comments

Comments

@thoughtpatterns
Copy link

Feature

The command substitution section of the specification for POSIX shell specifies:

The results of command substitution shall not be processed for further tilde expansion, parameter expansion, command substitution, or arithmetic expansion. If a command substitution occurs inside double-quotes, field splitting and pathname expansion shall not be performed on the results of the substitution.

Currently when syntax highlighting a subshell such as "$(printf "a b c")", the quotation marks will be parsed such that "$(printf " would be quoted, a b c would be unquoted, and ")" would be quoted; the current behavior (to my knowledge) somewhat obscures what is actually quoted.

Would it be possible to show the inside of a quoted subshell as unquoted? For example, "$(printf "a b c")" would show "$( as quoted (outside the subshell), printf as unquoted, "a b c" as quoted (inside the subshell), and )" as quoted (outside the subshell). Thank you!

Usecase

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant