Documentation
¶
Index ¶
Constants ¶
View Source
const ( HomeFromEnv = "VFOX_HOME" PluginFromEnv = "VFOX_PLUGIN" CacheFromEnv = "VFOX_CACHE" TempFromEnv = "VFOX_TEMP" HookFlag = "__VFOX_SHELL" PidFlag = "__VFOX_PID" )
View Source
const Newline = "\n"
View Source
const PathVarName = "PATH"
Variables ¶
This section is empty.
Functions ¶
func GetVfoxCache ¶ added in v0.6.6
func GetVfoxCache() string
func GetVfoxHome ¶ added in v0.6.6
func GetVfoxHome() string
func GetVfoxPlugin ¶ added in v0.6.6
func GetVfoxPlugin() string
func GetVfoxTemp ¶ added in v0.6.6
func GetVfoxTemp() string
func IsIDEEnvironmentResolution ¶ added in v0.9.2
func IsIDEEnvironmentResolution() bool
IsIDEEnvironmentResolution detects if the current shell session was launched by an IDE for the purpose of environment variable resolution. This is useful to avoid certain shell initialization behaviors that might interfere with IDE environment detection.
Supported IDEs:
- Visual Studio Code: Detects via VSCODE_RESOLVING_ENVIRONMENT environment variable Reference: https://code.visualstudio.com/docs/configure/command-line#_how-do-i-detect-when-a-shell-was-launched-by-vs-code
- JetBrains IDEs (IntelliJ IDEA, PyCharm, etc.): Detects via INTELLIJ_ENVIRONMENT_READER environment variable Reference: https://youtrack.jetbrains.com/articles/SUPPORT-A-1727/Shell-Environment-Loading
Returns true if any of the supported IDE environment resolution indicators are present.
Types ¶
type Envs ¶
Envs is a struct that contains environment variables and PATH.
func (*Envs) MergePaths ¶ added in v0.9.2
type Manager ¶
type Manager interface {
Flush() error
Load(envs *Envs) error
Get(key string) (string, bool)
Remove(envs *Envs) error
io.Closer
}
func NewEnvManager ¶
type Paths ¶ added in v0.2.5
Paths is a slice of PATH.
func NewPaths ¶ added in v0.3.0
NewPaths returns a new Paths. from is the source of the paths. If from is OsPaths, it returns the paths from the environment variable PATH.
func (*Paths) ToBinPaths ¶ added in v0.5.0
ToBinPaths returns a BinPaths from Paths which contains only executable files.
Click to show internal directories.
Click to hide internal directories.