diff options
Diffstat (limited to 'bash/bash_profile.d/fortune.bash')
-rw-r--r-- | bash/bash_profile.d/fortune.bash | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bash/bash_profile.d/fortune.bash b/bash/bash_profile.d/fortune.bash index 9879716a..5105b02d 100644 --- a/bash/bash_profile.d/fortune.bash +++ b/bash/bash_profile.d/fortune.bash @@ -1,8 +1,12 @@ # Only if shell is interactive -[[ $- == *i* ]] || return +if [[ $- != *i* ]] ; then + return +fi # Only if fortune(6) available -hash fortune 2>/dev/null || return +if ! hash fortune 2>/dev/null ; then + return +fi # Print from subshell to keep namespace clean ( |