diff --git a/SC2149.md b/SC2149.md index 51f8b3d..a296e03 100644 --- a/SC2149.md +++ b/SC2149.md @@ -4,7 +4,7 @@ _Note: Removed in [v0.5.0 - 2018-06-01](https://github.com/koalaman/shellcheck/c ### Problematic code: -```sh +```bash # Regular array index=42 echo $((array[$index])) @@ -12,7 +12,7 @@ echo $((array[$index])) or -```sh +```bash # Associative array index=banana echo $((array[$index])) @@ -20,7 +20,7 @@ echo $((array[$index])) ### Correct code: -``` +```bash # Regular array index=42 echo $((array[index])) @@ -28,7 +28,7 @@ echo $((array[index])) or -```sh +```bash # Associative array index=banana echo $((array[\$index])) @@ -40,7 +40,7 @@ For a numerically indexed array, the `$` is mostly pointless and can be removed For associative arrays, the `$` should be escaped to avoid accidental dereferencing: -```sh +```bash declare -A array index='$1' array[$index]=42