shellpath

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2026 License: Apache-2.0 Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 Find

func Find(name string) string

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

func LookPathIn(dirs []string, name string) string

LookPathIn is the first executable file named name in dirs ("" if none), as the shell would find it.

func UserPath

func UserPath(shell string) []string

UserPath is PATH as a new terminal has it: what an interactive login shell prints, else (it fails, or takes over 5 s) this process's PATH.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL