mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 11:19:45 +08:00
Created SC2287 (markdown)
27
SC2287.md
Normal file
27
SC2287.md
Normal file
@@ -0,0 +1,27 @@
|
||||
## This is interpreted as a command name ending with '/'. Double check syntax.
|
||||
|
||||
### Problematic code:
|
||||
|
||||
```sh
|
||||
df/
|
||||
```
|
||||
|
||||
### Correct code:
|
||||
|
||||
```sh
|
||||
df /
|
||||
```
|
||||
|
||||
### Rationale:
|
||||
|
||||
ShellCheck found a command name that ends with `/`. Since directories are not valid commands, this is always wrong.
|
||||
|
||||
The most common reason is bad quoting or escaping, such as in the example where a space was missing between a command and its argument.
|
||||
|
||||
### Exceptions:
|
||||
|
||||
None
|
||||
|
||||
### Related resources:
|
||||
|
||||
* Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!
|
Reference in New Issue
Block a user