SEARCH

Command History Search

Better than Ctrl+R. Fuzzy search with frecency ranking. Find commands by what you remember, not exact text.

Questions this answers

  • Is there a better alternative to Ctrl+R reverse search in the terminal?
  • How do I fuzzy search through terminal command history?
  • What is frecency ranking for command history?
  • Can I replace bash reverse search with something visual?

How it works

Chau7 intercepts Ctrl+R and replaces the default reverse-search with a visual fuzzy-search interface. Your entire command history appears in a filterable list. Type to narrow results with fuzzy matching: characters do not need to be contiguous, so typing 'dkr ps' matches 'docker compose ps' and 'docker ps -a'. Results update in real time as you type.

Results are ranked by frecency: a combination of frequency and recency. Commands you use often and recently appear at the top, while old one-off commands sink to the bottom. This means the command you are looking for is almost always in the first few results, even with a vague query.

The history search reads from your shell's history file (zsh, bash, or fish) and supplements it with commands executed in the current session. Duplicate entries are collapsed, and failed commands can be optionally filtered out. Select a result with Enter to insert it at the cursor, or press Tab to insert it for editing before execution.

Why it matters

Ctrl+R is powerful but the default interface is terrible: a single line of text, exact substring matching, and you have to cycle through results one at a time. Chau7 provides a proper search UI with fuzzy matching and frecency ranking (frequent + recent commands score higher). Find any command by typing fragments of what you remember.

Frequently asked questions

Does it work with zsh, bash, and fish history?

Yes. Chau7 detects your active shell and reads from the appropriate history file: ~/.zsh_history, ~/.bash_history, or ~/.local/share/fish/fish_history. All standard history formats are supported.

Can I delete entries from history search?

Yes. Highlight any entry and press a delete shortcut to remove it from both the search results and the underlying shell history file. Useful for removing commands that contained typos or sensitive information.

Does frecency ranking replace my shell's history order?

No. Frecency ranking only affects the display order in Chau7's search interface. Your shell's history file remains in chronological order, and native shell features like the up-arrow key continue to work as expected.