Last active
October 4, 2025 23:46
-
-
Save tukkek/a13fd17db317edf41fe78cbe42ca9c75 to your computer and use it in GitHub Desktop.
Linux terminal history utility
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/bash | |
| # 1. Install Fuzzy Finder: apt-get install fzf | |
| # 2. Place this script on your $PATH | |
| # 3. Add to your ~/.bashrc file: | |
| # alias "?=source history.sh" | |
| # 4. Use the ? alias to search and select commands | |
| cmd=`history|cut -c 8-|tac|fzf --reverse --scheme=history` | |
| eval "$cmd" | |
| history -s "$cmd" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment