mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Add a section, "Additional Options," which includes an example of a hex-encoded single quote in a dollar-single quoted string.
12
SC1011.md
12
SC1011.md
@@ -21,6 +21,18 @@ When writing a string in single-quotes, you have to make sure that any apostroph
|
|||||||
|
|
||||||
Escape them properly (see the correct code) or switch quotes to avoid the problem.
|
Escape them properly (see the correct code) or switch quotes to avoid the problem.
|
||||||
|
|
||||||
|
|
||||||
|
### Additional options:
|
||||||
|
```sh
|
||||||
|
echo '...peoples\ habits.'
|
||||||
|
...peoples\ habits.
|
||||||
|
```
|
||||||
|
```sh
|
||||||
|
$ echo $'...peoples\x27 habits.'
|
||||||
|
...peoples' habits.
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### Exceptions:
|
### Exceptions:
|
||||||
|
|
||||||
None.
|
None.
|
||||||
|
Reference in New Issue
Block a user