Documentation
¶
Index ¶
- func GetShellConfigs() map[ShellType]ShellConfig
- func RemoveEnvironmentVariable(key string) error
- func RemoveEnvironmentVariableFromShell(shellType ShellType, key string) error
- func SetEnvironmentVariable(key, value string) error
- func SetEnvironmentVariableForShell(shellType ShellType, key, value string) error
- type ShellConfig
- type ShellType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetShellConfigs ¶
func GetShellConfigs() map[ShellType]ShellConfig
GetShellConfigs returns configurations for different shells
func RemoveEnvironmentVariable ¶
RemoveEnvironmentVariable removes an environment variable from all shell configs
func RemoveEnvironmentVariableFromShell ¶
RemoveEnvironmentVariableFromShell removes an environment variable from a specific shell
func SetEnvironmentVariable ¶
SetEnvironmentVariable sets an environment variable for all detected shells
func SetEnvironmentVariableForShell ¶
SetEnvironmentVariableForShell sets an environment variable for a specific shell
Types ¶
type ShellConfig ¶
type ShellConfig struct {
Type ShellType
ConfigFile string
ExportCmd string
SourceCmd string
CommentChar string
}
ShellConfig represents shell-specific configuration
type ShellType ¶
type ShellType string
ShellType represents different shell types
func DetectUserShells ¶
DetectUserShells detects which shells the user has configured
func GetCurrentShell ¶
func GetCurrentShell() ShellType
GetCurrentShell attempts to detect the current shell
Click to show internal directories.
Click to hide internal directories.