wib · what is that bash?
The command you ran last week, before you ask.
Type two letters and wib lists the zsh commands you already ran, right under your prompt. Press ↓ then Enter to run one.
- zsh 5.3+
- macOS and Linux
- No daemon
- 100% local
- MIT
- git push origin master
- git status
- git commit -m "fix bug"
A lookup
per keystroke, about 5 ms
Every key you type starts a short process that reads your history, matches, ranks and prints the list, then exits. Nothing stays running.
Who comes first
ranked by how you work
What you use most and most recently rises to the top, and commands you ran in this repository win ties. The red card never worked, so it sinks below the rest without being hidden.
Your keys
typing and selecting
Keys only change meaning after you press down. Until then, up, Tab, Space and Enter do what zsh always did, and Ctrl-R is never touched.
Word by word
Shift+Tab, four times
Select an old command and take only the words you need, then edit the end. A quoted string like "fix bug" fills in a single press.
Type less, still land on the right command
Prefix matches come first, then the first letters of each word. Letters scattered through the middle of words don't count, so the list stays short.
- gi
- git push origin master
- Prefix. The commands you start most often rise to the top.
- dcup
- docker compose up
- Word starts: docker compose up.
- gi st
- git status
- Each chunk you type must start a word in the command.
- wib pull,master
- git pull origin master
- Keyword search. Remember a few words, in any order.
Ranked by how you actually work
Duplicates collapse to one line. What you reach for most is what you see first.
-
Often and recently
Frequency and recency decide the order. Suggestions come from the last 30 days by default, set with
WIB_PERIOD. -
Your project first
Among equally good matches, commands you ran inside the current git repository come first. Leave the project and the order goes back to normal.
-
Typos sink
A command that never succeeded, like
gti status, ranks after matches that did. It isn't hidden, and Ctrl-C doesn't count as a failure.
Fix a typo, reuse a template, keep secrets out
Small helpers around the list. None of them adds a process when a command succeeds, and none of them runs anything for you.
-
Did you mean?
Type
gti push origin feat-xand get "command not found": the next prompt offersgit push origin feat-x. Only the program name is corrected, and only to a program you have run before. -
Templates with Ctrl-]
Ctrl-] jumps to the parts of a command that changed between your earlier runs, like a port or an image tag. Type to replace the selected part.
-
Secrets stay out
Commands holding a token, a password flag, an
Authorization:header oruser:pass@in a URL are never saved or suggested.wib auditfinds old ones in your history, with the values masked. -
A checkup
wib doctorchecks your zsh version, key bindings, plugin load order and data folder, and tells you how to fix what's wrong.wib unforgetbrings back a command you hid withwib forget.
New in v0.2.0. See the changelog for every version.
Suggestions that appear on their own
Ctrl-R and fzf make you stop and open a search. wib refines a list with every keystroke, and your keys keep working as before until you press ↓.
| Tool | How you invoke it | Suggestions | Multi-machine sync |
|---|---|---|---|
| wib | Appears as you type | Several lines, right under the prompt | No, local only |
| zsh-autosuggestions | Appears as you type | One grey hint | No |
| Ctrl-R / fzf | Press a key to open | Search list | No |
| atuin | Press a key to open | Search list | Yes |
wib runs alongside oh-my-zsh, powerlevel10k, zsh-autosuggestions and vi mode.
Fast enough to run on every keystroke
Each lookup is a short-lived process that reads your history and exits. No index, no daemon, nothing that grows while your terminal stays open.
- 5.4 ms
- p95 lookup on 10,000 commands, process startup included
- 8.8 ms
- p95 lookup on 100,000 commands over 400 days
- ~2 MB
- peak memory per lookup on the 10,000-command file
- 0600
- file mode of wib's log. Nothing leaves your machine.
Measured with scripts/bench.sh on macOS, 100 lookups per file, WIB_PERIOD=30d.
Install in a minute
Prebuilt binaries from the v0.2.0 release. No Rust toolchain needed.
Requires zsh 5.3 or newer. Your existing ~/.zsh_history works from the first prompt.
Using Homebrew? Run brew install duylongpro99/tap/wib in place of step 1.
-
Download, verify and unpack
Download .tar.gzcurl -fsSL -O https://github.com/duylongpro99/wuts-that-bash/releases/download/v0.2.0/wib-aarch64-apple-darwin.tar.gz -O https://github.com/duylongpro99/wuts-that-bash/releases/download/v0.2.0/wib-aarch64-apple-darwin.tar.gz.sha256 shasum -a 256 -c wib-aarch64-apple-darwin.tar.gz.sha256 && tar -xzf wib-aarch64-apple-darwin.tar.gz && mkdir -p ~/.local/bin && mv wib-aarch64-apple-darwin/wib ~/.local/bin/Download .tar.gzcurl -fsSL -O https://github.com/duylongpro99/wuts-that-bash/releases/download/v0.2.0/wib-x86_64-apple-darwin.tar.gz -O https://github.com/duylongpro99/wuts-that-bash/releases/download/v0.2.0/wib-x86_64-apple-darwin.tar.gz.sha256 shasum -a 256 -c wib-x86_64-apple-darwin.tar.gz.sha256 && tar -xzf wib-x86_64-apple-darwin.tar.gz && mkdir -p ~/.local/bin && mv wib-x86_64-apple-darwin/wib ~/.local/bin/Download .tar.gzcurl -fsSL -O https://github.com/duylongpro99/wuts-that-bash/releases/download/v0.2.0/wib-x86_64-unknown-linux-musl.tar.gz -O https://github.com/duylongpro99/wuts-that-bash/releases/download/v0.2.0/wib-x86_64-unknown-linux-musl.tar.gz.sha256 sha256sum -c wib-x86_64-unknown-linux-musl.tar.gz.sha256 && tar -xzf wib-x86_64-unknown-linux-musl.tar.gz && mkdir -p ~/.local/bin && mv wib-x86_64-unknown-linux-musl/wib ~/.local/bin/Download .tar.gzcurl -fsSL -O https://github.com/duylongpro99/wuts-that-bash/releases/download/v0.2.0/wib-aarch64-unknown-linux-musl.tar.gz -O https://github.com/duylongpro99/wuts-that-bash/releases/download/v0.2.0/wib-aarch64-unknown-linux-musl.tar.gz.sha256 sha256sum -c wib-aarch64-unknown-linux-musl.tar.gz.sha256 && tar -xzf wib-aarch64-unknown-linux-musl.tar.gz && mkdir -p ~/.local/bin && mv wib-aarch64-unknown-linux-musl/wib ~/.local/bin/Downloaded with a browser on macOS? Clear the quarantine flag once with
xattr -d com.apple.quarantine ~/.local/bin/wib. The second line checks the archive against its.sha256checksum and stops if the download is damaged or incomplete. -
Hook it into zsh
Add these to the end of
~/.zshrc, after oh-my-zsh and other plugins.echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc echo 'eval "$(wib init zsh)"' >> ~/.zshrc -
Open a new terminal
Type
giand your git commands are already there.
Upgrading: run brew upgrade wib, or repeat step 1 only, then open a new terminal. Your history and settings stay as they are.
Your keys keep their meaning
Keys only change once you press ↓ to select a line. Ctrl-R, completion and history are untouched.
- ↓
- Start selecting, then move down the list
- Enter
- Run the selected command
- Tab
- Fill the selected command without running it
- Shift Tab
- Fill it word by word, to reuse it as a template
- Esc
- Hide the list until you type again
- Ctrl ]
- Jump to the next part that changed between earlier runs
- wib forget
- Never suggest a wrong or secret command again