Skip to content

v0.2.0

Latest

Choose a tag to compare

@codedeviate codedeviate released this 16 Jun 13:36

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-cli

Via the codedeviate/cli Homebrew tap (builds from source):

brew install codedeviate/cli/witch   # or: brew upgrade codedeviate/cli/witch

As a literal which replacement:

ln -s "$(command -v witch)" ~/.local/bin/which   # auto-enables strict mode

Added

  • Drop-in which compatibility: accepts the union of BSD and GNU which flags
  • -s silent flag (BSD which -s), an alias of --quiet
  • --strict mode (also auto-enabled when invoked as which via a symlink): disables fuzzy matching for byte-for-byte which behavior
  • GNU directory flags: --skip-dot, --skip-tilde, --show-dot, --show-tilde, --tty-only
  • GNU --read-alias/--skip-alias/--read-functions/--skip-functions accepted as no-ops for shell-wrapper compatibility

Changed

  • Exact matches now resolve through a dedicated which-style lookup; -a lists every instance on PATH including duplicates from repeated PATH entries

Full changelog: CHANGELOG.md @ v0.2.0