HSTR

Shell history TUI suggest box for bash and zsh that searches, navigates, and manages command history, with bookmarking of favorite commands.

HSTR (HiSToRy) is a command line utility that provides command completion from shell history for bash and zsh. It presents history in a TUI suggest box and is intended as a replacement for the Ctrl-r reverse search, for finding and reusing earlier commands, particularly long ones.

Beyond search and navigation, HSTR can manage the history itself. You can delete commands that are obsolete or that contain sensitive information, and you can bookmark favorite commands so they are easy to find again. The project's tips documentation covers hiding commands from history, using command tags for fast lookup, and curating favorites.

Setup is done by appending generated configuration to your shell rc file: hstr --show-bash-configuration >> ~/.bashrc for bash or hstr --show-zsh-configuration >> ~/.zshrc for zsh. The README links installation instructions for many platforms, including Ubuntu, Debian, Fedora, RHEL/CentOS, openSUSE, Gentoo, Alpine, Arch, FreeBSD, macOS, nix, and Guix, as well as build-from-source guides for Linux, WSL, Cygwin, and macOS. It targets anyone working in a bash or zsh terminal who relies on command history. Documentation is available through man hstr.

Alternatives & related tools

add a badge to your README

Maintain HSTR? Show that it's featured on trmn. The badge links back to this page.

Featured on trmn
Markdown
[![Featured on trmn](https://www.trmn.sh/badge/hstr.svg)](https://www.trmn.sh/tools/hstr?utm_source=badge)
HTML
<a href="https://www.trmn.sh/tools/hstr?utm_source=badge"><img src="https://www.trmn.sh/badge/hstr.svg" alt="Featured on trmn" height="20"></a>