Merge sorin-ionescu/prezto/pull/1183
This commit is contained in:
commit
c5c466df9c
2 changed files with 12 additions and 4 deletions
|
@ -14,10 +14,13 @@
|
||||||
fi
|
fi
|
||||||
} &!
|
} &!
|
||||||
|
|
||||||
# Print a random, hopefully interesting, adage.
|
# Execute code only if STDERR is bound to a TTY.
|
||||||
if (( $+commands[fortune] )); then
|
[[ -o INTERACTIVE && -t 2 ]] && {
|
||||||
if [[ -t 0 || -t 1 ]]; then
|
|
||||||
|
# Print a random, hopefully interesting, adage.
|
||||||
|
if (( $+commands[fortune] )); then
|
||||||
fortune -s
|
fortune -s
|
||||||
print
|
print
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
} >&2
|
||||||
|
|
|
@ -5,9 +5,14 @@
|
||||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Execute code only if STDERR is bound to a TTY.
|
||||||
|
[[ -o INTERACTIVE && -t 2 ]] && {
|
||||||
|
|
||||||
# Print the message.
|
# Print the message.
|
||||||
cat <<-EOF
|
cat <<-EOF
|
||||||
|
|
||||||
Thank you. Come again!
|
Thank you. Come again!
|
||||||
-- Dr. Apu Nahasapeemapetilon
|
-- Dr. Apu Nahasapeemapetilon
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
} >&2
|
||||||
|
|
Loading…
Add table
Reference in a new issue