Add POSIX checks for more Bash-specific variables (fixes #2093)
This commit is contained in:
parent
65044c2568
commit
b625562d60
|
@ -417,9 +417,15 @@ checkBashisms = ForShell [Sh, Dash] $ \t -> do
|
|||
(re $ "^[" ++ varChars ++ "*@]+(\\[.*\\])?/", 3060, "string replacement is")
|
||||
]
|
||||
bashVars = [
|
||||
-- This list deliberately excludes $BASH_VERSION as it's often used
|
||||
-- for shell identification.
|
||||
"OSTYPE", "MACHTYPE", "HOSTTYPE", "HOSTNAME",
|
||||
"DIRSTACK", "EUID", "UID", "SHLVL", "PIPESTATUS", "SHELLOPTS",
|
||||
"_"
|
||||
"_", "BASHOPTS", "BASHPID", "BASH_ALIASES", "BASH_ARGC",
|
||||
"BASH_ARGV", "BASH_ARGV0", "BASH_CMDS", "BASH_COMMAND",
|
||||
"BASH_EXECUTION_STRING", "BASH_LINENO", "BASH_REMATCH", "BASH_SOURCE",
|
||||
"BASH_SUBSHELL", "BASH_VERSINFO", "EPOCHREALTIME", "EPOCHSECONDS",
|
||||
"FUNCNAME", "GROUPS", "MACHTYPE", "MAPFILE"
|
||||
]
|
||||
bashDynamicVars = [ "RANDOM", "SECONDS" ]
|
||||
dashVars = [ "_" ]
|
||||
|
|
Loading…
Reference in New Issue