mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Updated SC2298 (markdown)
@@ -39,7 +39,7 @@ ShellCheck found a parameter expansion `${..}` where the first element was a sec
|
|||||||
|
|
||||||
In the first example, the extra `$` was unintentional and should simply be deleted.
|
In the first example, the extra `$` was unintentional and should simply be deleted.
|
||||||
|
|
||||||
In the second example, `${$var##*/}` was used in the hopes that it would expand to `${myvar##*/}` and subsequently strip the path. This is not possible, and `var` must instead be expanded indirectly in a separate step, before the path can be stripped as usual.
|
In the second example, `${$var##*/}` was used in the hopes that it would expand to `${myvar##*/}` and subsequently strip the path. This is not possible, and `var` must instead be expanded indirectly in a separate step, before the path can be stripped as usual. More information and other approaches can be found in the description of [[SC2082]].
|
||||||
|
|
||||||
### Exceptions:
|
### Exceptions:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user