LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

hstr

enhanced shell history browser

TLDR

Launch hstr
$ hstr
copy
Search command history
$ hstr [pattern]
copy
Show favorites
$ hstr -f
copy
Non-interactive search
$ hstr -n [pattern]
copy
Add current binding
$ hstr --show-configuration >> ~/.bashrc
copy

SYNOPSIS

hstr [options] [pattern]

DESCRIPTION

hstr (HiSToRy) is an enhanced shell history browser. It provides a visual interface for searching and selecting commands from history, with ranking by frequency and recency.The tool integrates with bash and zsh, replacing or augmenting Ctrl+R with a more powerful search interface.

PARAMETERS

-f, --favorites

Show favorite commands.
-n, --non-interactive
Non-interactive mode.
-s, --show-configuration
Show shell configuration.
-b, --show-blacklist
Show blacklisted commands.
--show-zsh-configuration
Show zsh configuration for integration.
-V, --version
Show version.

ENVIRONMENT

HSTR_CONFIG

Comma-separated configuration options: hicolor, monochromatic, case-sensitive, raw-history-view, favorites-view, duplicates, verbose-kill, blacklist, keywords-matching, static-favorites, skip-favorites-comments.

KEYBOARD SHORTCUTS

Ctrl+R: Search historyTab / Right: Complete selectionCtrl+F: Add to favoritesCtrl+/ / Ctrl+7: Rotate view (history/favorites/sorted)Ctrl+E: Toggle regex modeCtrl+L: Toggle case sensitivityDel: Remove command from history

CAVEATS

Requires shell configuration. Large history may be slow initially. Favorites stored separately. Works best with large history limit.

HISTORY

hstr was created by Martin Dvorak to improve command-line history navigation. It addresses the limitations of basic Ctrl+R search by providing visual feedback and better ranking algorithms.

SEE ALSO

fzf(1), mcfly(1), history(1), bash(1)

Copied to clipboard
Kai