Documentation
¶
Overview ¶
Package shellpath finds programs as the user's terminal would: on the PATH an interactive login shell sets, which a GUI app or a login item doesn't inherit (Homebrew, the Google Cloud SDK, ~/.local/bin).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdoptUserPath ¶ added in v0.5.0
func AdoptUserPath() int
AdoptUserPath gives this process the user's terminal's PATH (see Merge): a service that launchd, systemd or the tray started has the system's bare one, without the folders language servers and tools are installed in (nvm, Homebrew, ~/go/bin). It returns how many folders were added. Windows has no login shell to ask: nothing changes there.
func Find ¶
Find is the program named name on this process's PATH, else on the user's terminal's ("" if on neither).
func LoginShell ¶
func LoginShell() string
LoginShell is the user's shell ($SHELL, else the system's default).
func LookPathIn ¶
LookPathIn is the first executable file named name in dirs ("" if none), as the shell would find it.
Types ¶
This section is empty.