mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-26 06:24:26 +08:00
Implement supportsArrays with pattern-matching
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user