Skip to content

Commit 1e67944

Browse files
authored
Merge pull request #3257 from e-kwsm/SC2232
feat(SC2232): add more shell builtins
2 parents 5b40fde + c0f1265 commit 1e67944

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ShellCheck/Checks/Commands.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ checkSudoArgs = CommandCheck (Basename "sudo") f
12441244
command <- getLiteralString commandArg
12451245
guard $ command `elem` builtins
12461246
return $ warn (getId t) 2232 $ "Can't use sudo with builtins like " ++ command ++ ". Did you want sudo sh -c .. instead?"
1247-
builtins = [ "cd", "eval", "export", "history", "read", "source", "wait" ]
1247+
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" ]
12481248
-- This mess is why ShellCheck prefers not to know.
12491249
parseOpts = getBsdOpts "vAknSbEHPa:g:h:p:u:c:T:r:"
12501250

0 commit comments

Comments
 (0)