mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-10 15:22:58 -07:00
Implement supportsArrays with pattern-matching
This commit is contained in:
parent
0cc5ed4563
commit
fb55072302
1 changed files with 3 additions and 1 deletions
|
@ -934,7 +934,9 @@ getOpts string flags = process flags
|
||||||
more <- process rest2
|
more <- process rest2
|
||||||
return $ (flag1, token1) : more
|
return $ (flag1, token1) : more
|
||||||
|
|
||||||
supportsArrays shell = shell == Bash || shell == Ksh
|
supportsArrays Bash = True
|
||||||
|
supportsArrays Ksh = True
|
||||||
|
supportsArrays _ = False
|
||||||
|
|
||||||
-- Returns true if the shell is Bash or Ksh (sorry for the name, Ksh)
|
-- Returns true if the shell is Bash or Ksh (sorry for the name, Ksh)
|
||||||
isBashLike :: Parameters -> Bool
|
isBashLike :: Parameters -> Bool
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue