Implement supportsArrays with pattern-matching

This commit is contained in:
Joseph C. Sible 2020-04-05 16:30:59 -04:00
parent 0cc5ed4563
commit fb55072302
1 changed files with 3 additions and 1 deletions

View File

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