astral-sh/uv
uv-shell
crates/uv-shell/ detects the active shell and provides helpers for installing shell
completions and updating PATH for uv tool install and uv python update-shell.
Purpose
Adding ~/.local/bin to PATH correctly is surprisingly fiddly: bash, zsh, fish, csh, and
PowerShell all keep their init files in different places, with different syntaxes, and
treating them all uniformly is half the battle. This crate centralizes the logic.
Key abstractions
Shellenum —Bash,Zsh,Fish,Tcsh,Nushell,PowerShell,Cmd.Shell::detect()— usesSHELL, parent process inspection, andpsutil-style fallbacks.- Helpers for finding the right rc file (
.bashrc,.zshrc,config.fish, profile.ps1, …). - A
prepend_to_pathoperation that idempotently adds a directory to PATH in the right syntax for that shell.
See also
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.