Expand description
The app’s command line on PATH.
Windows puts the package’s current directory on the user Path from the install hook
and takes it off from the uninstall hook. macOS links /usr/local/bin/<command> to the
binary in the .app, with administrator rights asked through osascript; Linux links
~/.local/bin/<command> to the AppImage. Both are made and removed when the user asks.
An update keeps the binary’s path, so nothing is made again after one.
Structs§
- CliSpec
- The command line a package puts on
PATH.
Enums§
- CliStatus
- Whether the command line is on
PATH.
Constants§
- LOGIN_
PATH_ WAIT - How long
on_login_pathwaits for the shell: an interactive shell’s start files can take several seconds on a machine busy with its disk.
Functions§
- install
- Puts the command line on
PATH. Never replaces another program’s: a file that is not a link, or a link to another file (CliStatus::Taken). - on_
login_ path - Whether
diris on thePATHa terminal gets: the one the user’s login shell sets up, orNonewhen the shell does not answer withinLOGIN_PATH_WAIT. A window started from the desktop’s menu often has a shorterPATHthan a terminal, since shells add~/.local/binin their own start files, soon_pathwould warn about a directory every terminal has; and a busy machine can take seconds to start a shell, so a missing answer is not a “no”. It blocks while the shell starts: call it off the UI thread. - on_path
- Whether
diris on this process’sPATH: Linux’s~/.local/binis not on every distribution’s. - status
- Whether the command line is on
PATH. - uninstall
- Takes the command line off
PATH. Nothing to take off is not an error.