Documentation
¶
Overview ¶
Package shellenv loads the environment of a user's login shell.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JoinCommandLine ¶ added in v0.1.0
JoinCommandLine quotes args so that SplitCommandLine returns them unchanged.
func LookPath ¶
LookPath finds an executable using the supplied environment's PATH and, on Windows, PATHEXT.
func ParseEnv0 ¶
ParseEnv0 parses NUL-separated environment entries after the marker. The marker may be followed by a newline or a NUL separator.
func Resolve ¶
Resolve loads the login shell environment within timeout. On Windows it returns the process environment.
func SplitCommandLine ¶ added in v0.1.0
SplitCommandLine splits a command line into arguments using POSIX shell quoting rules: single quotes, double quotes with backslash escapes, and backslash escapes outside quotes. It does not expand variables or globs.
Types ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver loads a shell environment once. Its methods are safe for concurrent use.
func (*Resolver) Env ¶
Env waits for the resolution or its deadline and returns an independent slice. It uses the current process environment if the resolution fails.