Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save OctaneInteractive/16a13462f8f36e041b33f3515cb23cef to your computer and use it in GitHub Desktop.
Save OctaneInteractive/16a13462f8f36e041b33f3515cb23cef to your computer and use it in GitHub Desktop.
Search history in Bash
# 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