Only print fortunes in terminals
This commit is contained in:
parent
34a50c2550
commit
5791c07d48
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
# Print a random, hopefully interesting, adage.
|
# Print a random, hopefully interesting, adage.
|
||||||
if (( $+commands[fortune] )); then
|
if (( $+commands[fortune] )); then
|
||||||
|
if [[ -t 0 || -t 1 ]]; then
|
||||||
fortune -a
|
fortune -a
|
||||||
print
|
print
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue