(parsed: ParsedPowerShellCommand)
| 1576 | */ |
| 1577 | // exported for testing |
| 1578 | export function hasDirectoryChange(parsed: ParsedPowerShellCommand): boolean { |
| 1579 | for (const cmdName of getAllCommandNames(parsed)) { |
| 1580 | if ( |
| 1581 | DIRECTORY_CHANGE_CMDLETS.has(cmdName) || |
| 1582 | DIRECTORY_CHANGE_ALIASES.has(cmdName) |
| 1583 | ) { |
| 1584 | return true |
| 1585 | } |
| 1586 | } |
| 1587 | return false |
| 1588 | } |
| 1589 | |
| 1590 | /** |
| 1591 | * Check if the command is a single simple command (no pipes, no semicolons, no operators). |
nothing calls this directly
no test coverage detected