mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 11:19:45 +08:00
Created SC2275 (markdown)
28
SC2275.md
Normal file
28
SC2275.md
Normal file
@@ -0,0 +1,28 @@
|
||||
## Command name starts with =. Bad line break?
|
||||
|
||||
### Problematic code:
|
||||
|
||||
```sh
|
||||
my_variable
|
||||
=value
|
||||
```
|
||||
|
||||
### Correct code:
|
||||
|
||||
```sh
|
||||
myvariable=value
|
||||
```
|
||||
|
||||
### Rationale:
|
||||
|
||||
ShellCheck found a command name starting with a `=`. This was likely not meant as a new command, but instead a continuation from a previous line.
|
||||
|
||||
Make sure the `=` is used correctly.
|
||||
|
||||
### Exceptions:
|
||||
|
||||
None, though you can quote the value to make ShellCheck ignore it, e.g. `"=foo"`.
|
||||
|
||||
### Related resources:
|
||||
|
||||
* Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!
|
Reference in New Issue
Block a user