TheByteDungeon

TheByteDungeon is a personal tech blog where I document my thoughts, explore technical challenges, and reinforce my knowledge.

Home Posts Projects View on GitHub
26 September 2024

Searching command history with hstr

Have you ever been trying to find command you’ve use before, only to find all incorreclty types commands? Does this seem familiar? history | foobar or ctrl+r+foobar barfoor arfoo etc.

Look no further hstr is there to save the day (notice the niiiice theme?)! :star:


Install and use

Install with:
sudo apt install hstr

Now configure hstr:
bash

hstr --show-configuration >> .bashrc
source ~/.bashrc

zsh

hstr --show-zsh-configuration >> .zshrc
source ~/.zshrc`

ctrl+r and viola!

hstr


Conclusion

Easy as pie, searching through the command history was made that much simpler with such an easy installation! :pie:

tags: command - hstr - history