mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-03-12 12:35:25 -07:00
change '..' to 'STATEMENT'. Because initially, when I see '..', I thought it means go to parent directory.
parent
91049dd56c
commit
289593c64f
@ -1,4 +1,4 @@
|
||||
# Use $(..) instead of legacy \`..\`
|
||||
# Use $(STATEMENT) instead of legacy \`STATEMENT\`
|
||||
|
||||
### Problematic code
|
||||
|
||||
@ -14,13 +14,13 @@ echo "Current time: $(date)"
|
||||
|
||||
### Rationale
|
||||
|
||||
Backtick command substitution `` `..` `` is legacy syntax with several issues.
|
||||
Backtick command substitution `` `STATEMENT` `` is legacy syntax with several issues.
|
||||
|
||||
1. It has a series of undefined behaviors related to quoting in POSIX.
|
||||
1. It imposes a custom escaping mode with surprising results.
|
||||
1. It's exceptionally hard to nest.
|
||||
|
||||
`$(..)` command substitution has none of these problems, and is therefore strongly encouraged.
|
||||
`$(STATEMENT)` command substitution has none of these problems, and is therefore strongly encouraged.
|
||||
|
||||
### Exceptions
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user