Documentation
¶
Index ¶
Constants ¶
const ( HomeFromEnv = "VFOX_HOME" PluginFromEnv = "VFOX_PLUGIN" CacheFromEnv = "VFOX_CACHE" TempFromEnv = "VFOX_TEMP" HookFlag = "__VFOX_SHELL" PidFlag = "__VFOX_PID" )
const Newline = "\n"
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.
func IsMultiplexerEnvironment ¶ added in v0.10.0
func IsMultiplexerEnvironment() bool
IsMultiplexerEnvironment detects if the current shell session is running inside a multiplexer or other environment where new panes/windows should have isolated environments. This includes tmux, screen, and potentially other terminal multiplexers.
Supported multiplexers:
- tmux: Detects via TMUX environment variable
Returns true if running in a multiplexer environment.
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.