-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
For bugs with existing features
- SC2016
- online
- The rule's wiki page does not already cover this (e.g. https://shellcheck.net/wiki/SC2086)
- I tried on https://www.shellcheck.net/ and verified that this is still a problem on the latest commit
Here's a snippet or screenshot that shows the problem:
#!/bin/bash
sed 's/[][\.|$(){}?+*^]/\\&/g'
Here's what shellcheck currently says:
In btest.sh line 2:
sed 's/[][\.|$(){}?+*^]/\\&/g'
^------------------------^ SC2016 (info): Expressions don't expand in single quotes, use double quotes for that.
Here's what I wanted or expected to see:
nothing.
Rationale
sed
command can contain as many RegEx signs, as possible. The ShellCheck should ignore internal content of this command.
Metadata
Metadata
Assignees
Labels
No labels