aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/hgrep.bash
diff options
context:
space:
mode:
Diffstat (limited to 'bash/bashrc.d/hgrep.bash')
-rw-r--r--bash/bashrc.d/hgrep.bash16
1 files changed, 0 insertions, 16 deletions
diff --git a/bash/bashrc.d/hgrep.bash b/bash/bashrc.d/hgrep.bash
deleted file mode 100644
index 2f7f8d54..00000000
--- a/bash/bashrc.d/hgrep.bash
+++ /dev/null
@@ -1,16 +0,0 @@
-# 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() {
- if ! (($#)) ; then
- printf >&2 '%s: Need a pattern\n' "$FUNCNAME"
- exit 2
- fi
- if ! [[ -n $HISTFILE ]] ; then
- printf >&2 '%s: No HISTFILE\n' "$FUNCNAME"
- exit 2
- fi
- grep "$@" "$HISTFILE"
-}