mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Updated SC1003 (markdown)
@@ -1,4 +1,6 @@
|
||||
## Want to escape a single quote? echo 'This is how it'\''s done'.
|
||||
## Want to escape a single quote? echo 'This is how it'\\''s done'.
|
||||
|
||||
(Note: in v0.4.6, the error message was accidentally missing the backslash)
|
||||
|
||||
### Problematic code:
|
||||
|
||||
@@ -12,6 +14,7 @@ echo 'This is not how it\'s done'.
|
||||
echo 'This is how it'\''s done'.
|
||||
```
|
||||
|
||||
|
||||
### Rationale
|
||||
|
||||
In POSIX shell, the shell cares about nothing but another single quote to terminate the quoted segment. Not even backslashes are interpreted.
|
||||
|
Reference in New Issue
Block a user