Updated SC2124 (markdown)

ebersphi
2020-03-04 16:51:05 +01:00
parent 8798d56a59
commit 4ec2544433

@@ -50,3 +50,13 @@ The same is true for `${@: -1}`, which results in 0 or 1 elements: `var=${*: -1}
### Exceptions
None.
### Adding an element to an array may trigger this warning when you forget the parenthesis.
```
filelist="${filelist[@]}" "$filename"
```
What was meant is:
```
filelist=("${filelist[@]}" "$filename")
```
Note: this syntax is compatible with older shells, in later shells (bash 3.1+ and zsh 4.2+) you can do: ```filelist+=("$filename")```