mirror of
https://github.com/koalaman/shellcheck
synced 2025-08-20 13:23:55 -07:00
feat(SC2232): add more shell builtins
This commit is contained in:
parent
7dc4214149
commit
c0f1265fa0
1 changed files with 1 additions and 1 deletions
|
@ -1244,7 +1244,7 @@ checkSudoArgs = CommandCheck (Basename "sudo") f
|
||||||
command <- getLiteralString commandArg
|
command <- getLiteralString commandArg
|
||||||
guard $ command `elem` builtins
|
guard $ command `elem` builtins
|
||||||
return $ warn (getId t) 2232 $ "Can't use sudo with builtins like " ++ command ++ ". Did you want sudo sh -c .. instead?"
|
return $ warn (getId t) 2232 $ "Can't use sudo with builtins like " ++ command ++ ". Did you want sudo sh -c .. instead?"
|
||||||
builtins = [ "cd", "eval", "export", "history", "read", "source", "wait" ]
|
builtins = [ "cd", "command", "declare", "eval", "exec", "exit", "export", "hash", "history", "local", "popd", "pushd", "read", "readonly", "return", "set", "source", "trap", "type", "typeset", "ulimit", "umask", "unset", "wait" ]
|
||||||
-- This mess is why ShellCheck prefers not to know.
|
-- This mess is why ShellCheck prefers not to know.
|
||||||
parseOpts = getBsdOpts "vAknSbEHPa:g:h:p:u:c:T:r:"
|
parseOpts = getBsdOpts "vAknSbEHPa:g:h:p:u:c:T:r:"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue