Created
February 28, 2020 07:49
-
-
Save OctaneInteractive/16a13462f8f36e041b33f3515cb23cef to your computer and use it in GitHub Desktop.
Search history in Bash
This file contains 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
# Add to ".bashrc" or ".bash_profile". | |
find_command () { | |
# find command. | |
# Usage: find_command term | |
if [ "$1" ]; then | |
history | grep -i $1 | |
else | |
echo "A search term is required." | |
return | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment