Updated SC2298 (markdown)

Vidar Holen
2021-08-16 21:52:36 -07:00
parent c039776ac1
commit 4e26fe7685

@@ -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: