Documentation
¶
Index ¶
Constants ¶
const ( PathEnvVarName = "PATH" ShellEnvVarName = "SHELL" )
Environment variable names
Variables ¶
This section is empty.
Functions ¶
func LoadConfiguredEnvironment ¶
LoadConfiguredEnvironment updates the environment with user and local configuration. First Bash's env is read (as a fallback), then the user's preferred SHELL's env is read, then the configuration files. The Bash env PATH is appended to the existing PATH (as a fallback), any other new PATH read is prepended (preferential).
func UpdatePath ¶
UpdatePath prepends or appends the extension to the current path. For append, if the entry is already there, it will not be re-added / moved. For prepend, if the entry is already there, it will be correctly re-prioritized to the front. The result is set into the process environment with os.Setenv.
pathExtension string the path component to be added. prepend bool whether to pre- or append
Types ¶
This section is empty.