Return True if cmd is a bash builtin.
( cmd )
| 221 | # pylint: enable=maybe-no-member |
| 222 | |
| 223 | def isShellBuiltin( cmd ): |
| 224 | "Return True if cmd is a bash builtin." |
| 225 | if isShellBuiltin.builtIns is None: |
| 226 | isShellBuiltin.builtIns = set(quietRun( 'bash -c enable' ).split()) |
| 227 | space = cmd.find( ' ' ) |
| 228 | if space > 0: |
| 229 | cmd = cmd[ :space] |
| 230 | return cmd in isShellBuiltin.builtIns |
| 231 | |
| 232 | |
| 233 | isShellBuiltin.builtIns = None |