whi
whi is a smarter which that also lets you rearrange your current shell's PATH safely.
Whi is path-only again.
Deprecation notice for 0.7.0
whiis intentionally droppingwhifileactivation, environment-variable management, and virtual-environment support so the project can stay focused on PATH management.
- If you still need those features, stay on
whi 0.6.x.- Legacy profile and saved PATH files may still contain
!env.*,!whi.extra, orENV!sections;whiwill keep reading them for compatibility, but those directives are ignored and never rewritten.- The follow-up project for the removed functionality will be
envy.
- Managed features:
prefer,add,move,switch,clean,delete,undo,redo,reset,diff,apply,save,load,list,rmp,shorthands - Removed features: environment-variable management,
whifileactivation, and virtual environment management
Install shell integration
| # add to the end of ~/.config/fish/config.fish
Common commands
Persist PATH
File format
Saved PATH files and profiles use a path-only directive format:
!path.replace
/usr/local/bin
/usr/bin
/bin
Supported directives:
!path.replace!path.prepend!path.append- legacy
PATH! - legacy colon-separated PATH strings
Deprecated directives are still parsed for compatibility and ignored:
!env.set!env.replace!env.unset!whi.extra- legacy
ENV!
Shorthands
whip -> whi prefer
whim -> whi move
whis -> whi switch
whic -> whi clean
whid -> whi delete
whia -> whi --all
whiad -> whi add
whin -> whi -n
whiu -> whi undo
whir -> whi redo
whil -> whi load
whish -> whi shorthands
Storage
- Saved PATH files:
~/.whi/saved_path_bash,~/.whi/saved_path_zsh,~/.whi/saved_path_fish - Profiles:
~/.whi/profiles/ - Config:
~/.whi/config.toml - Protected paths:
~/.whi/protected_paths - Session history:
${XDG_RUNTIME_DIR:-/tmp}/whi-<uid>/session_<pid>.*
Notes
- Mutating commands require shell integration because they must update the current shell's
PATH. whi applypreserves protected paths by default. Use--no-protectto skip that safety behavior.