Linux command
hstr 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Launch hstr
hstr
Search command history
hstr [pattern]
Show favorites
hstr -f
Non-interactive search
hstr -n [pattern]
Add current binding
hstr --show-configuration >> ~/.bashrc
说明
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.
参数
- -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.
FAQ
What is the hstr command used for?
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.
How do I run a basic hstr example?
Run `hstr` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -f, --favorites do in hstr?
Show favorite commands.