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

Coalesce quotes with shellcheck -p diff #2996

Open
Ericson2314 opened this issue Jun 5, 2024 · 0 comments
Open

Coalesce quotes with shellcheck -p diff #2996

Ericson2314 opened this issue Jun 5, 2024 · 0 comments

Comments

@Ericson2314
Copy link

For new checks and feature suggestions

Here's a snippet or screenshot that shows the problem:

My understanding from NixOS/nix#10857 is that shellcheck -p diff suggests things like

foo$bar#baz$quux

=>

foo"$bar"#baz"$quux"

Here's what I wanted or expected to see:

It would be nice if we could instead coalesce the quote so we we have

foo$bar#baz$quuex

=>

"foo$bar#baz$quux"

is there a mode to do that? Would it be hard to add? Is it easy to fake the feature with a regex in the meantime? :D

@Ericson2314 Ericson2314 changed the title coalesce quotes Coalesce quotes with hellcheck -p diff Jun 5, 2024
@Ericson2314 Ericson2314 changed the title Coalesce quotes with hellcheck -p diff Coalesce quotes with shellcheck -p diff Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant