aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-10 13:23:37 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-10 13:23:37 +1200
commitc9b228485f21751afbda04f2d7cfac19042311a2 (patch)
treeae31aef7752515e5461f1bfc5d23e5496342a73d /bash/bashrc.d
parentExplain pdksh policy more thoroughly (diff)
downloaddotfiles-c9b228485f21751afbda04f2d7cfac19042311a2.tar.gz
dotfiles-c9b228485f21751afbda04f2d7cfac19042311a2.zip
Add explicit -n to hgrep() $HISTFILE check
Diffstat (limited to 'bash/bashrc.d')
-rw-r--r--bash/bashrc.d/hgrep.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/bash/bashrc.d/hgrep.bash b/bash/bashrc.d/hgrep.bash
index e5a5d4c9..2f7f8d54 100644
--- a/bash/bashrc.d/hgrep.bash
+++ b/bash/bashrc.d/hgrep.bash
@@ -8,7 +8,7 @@ hgrep() {
printf >&2 '%s: Need a pattern\n' "$FUNCNAME"
exit 2
fi
- if ! [[ $HISTFILE ]] ; then
+ if ! [[ -n $HISTFILE ]] ; then
printf >&2 '%s: No HISTFILE\n' "$FUNCNAME"
exit 2
fi