aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_profile.d/verse.bash
diff options
context:
space:
mode:
Diffstat (limited to 'bash/bash_profile.d/verse.bash')
-rw-r--r--bash/bash_profile.d/verse.bash8
1 files changed, 6 insertions, 2 deletions
diff --git a/bash/bash_profile.d/verse.bash b/bash/bash_profile.d/verse.bash
index d7877a05..f463d074 100644
--- a/bash/bash_profile.d/verse.bash
+++ b/bash/bash_profile.d/verse.bash
@@ -1,8 +1,12 @@
# Only if shell is interactive
-[[ $- == *i* ]] || return
+if [[ $- != *i* ]] ; then
+ return
+fi
# Only if verse(1) available
-hash fortune 2>/dev/null || return
+if ! hash verse 2>/dev/null ; then
+ return
+fi
# Run verse(1) if we haven't seen it already today (the verses are selected by
# date); run in a subshell to keep vars out of global namespace