Makes witch a drop-in which — a superset of the BSD and GNU which flags, plus a strict mode — while keeping typo-tolerant fuzzy matching as the default.
Install
Via crates.io:
cargo install witch-cliVia the codedeviate/cli Homebrew tap (builds from source):
brew install codedeviate/cli/witch # or: brew upgrade codedeviate/cli/witchAs a literal which replacement:
ln -s "$(command -v witch)" ~/.local/bin/which # auto-enables strict modeAdded
- Drop-in
whichcompatibility: accepts the union of BSD and GNUwhichflags -ssilent flag (BSDwhich -s), an alias of--quiet--strictmode (also auto-enabled when invoked aswhichvia a symlink): disables fuzzy matching for byte-for-bytewhichbehavior- GNU directory flags:
--skip-dot,--skip-tilde,--show-dot,--show-tilde,--tty-only - GNU
--read-alias/--skip-alias/--read-functions/--skip-functionsaccepted as no-ops for shell-wrapper compatibility
Changed
- Exact matches now resolve through a dedicated
which-style lookup;-alists every instance onPATHincluding duplicates from repeatedPATHentries
Full changelog: CHANGELOG.md @ v0.2.0