diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-10 13:23:37 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-10 13:23:37 +1200 |
commit | c9b228485f21751afbda04f2d7cfac19042311a2 (patch) | |
tree | ae31aef7752515e5461f1bfc5d23e5496342a73d /bash/bashrc.d | |
parent | Explain pdksh policy more thoroughly (diff) | |
download | dotfiles-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.bash | 2 |
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 |