utils/shell/shell_provider library

Classes

ShellConfig
Shell provider configuration.

Enums

FlagArgType
Flag argument types for read-only validation.
ShellType
Shell type.

Constants

safeDockerSubcommands → const Set<String>
Safe docker subcommands (read-only).
safeGhSubcommands → const Set<String>
Safe gh (GitHub CLI) subcommands (read-only).
safeGitSubcommands → const Map<String, Set<String>>
Safe git subcommands for read-only mode.
safePackageManagerSubcommands → const Set<String>
Safe npm/yarn/pnpm subcommands (read-only).
safePipSubcommands → const Set<String>
Safe pip subcommands (read-only).

Functions

buildEnvironment(ShellConfig config, {Map<String, String>? additional, String? workingDirectory}) Map<String, String>
Build environment overrides for a command execution.
buildExecCommand(String command, ShellConfig config, {String? workingDirectory, bool trackCwd = false}) → ({List<String> args, String executable})
Build the command and arguments for shell execution.
detectShell({Map<String, String>? env}) ShellConfig
Detect the user's shell.
getShellHistoryFile(ShellType type) String?
Get the user's shell history file.
getShellProfile(ShellType type) String?
Get the user's shell profile file.
validateReadOnlyCommand(String command) String?
Validate a command for read-only mode.