aboutsummaryrefslogblamecommitdiff
path: root/bash/bashrc.d/hgrep.bash
blob: 3d0d05893332989132fb5806d8b63f8e4392ad4c (plain) (tree)
1
2
3
4
5
6
7
8
9





                                                                              
                                 

 
# Search shell history file for a pattern. If you put your whole HISTFILE
# contents into memory, then you probably don't need this, as you can just do:
#
#     $ history | grep PATTERN
#
hgrep() {
    grep "${@:?}" "${HISTFILE:?}"
}