2012-05-22 12:49:45 -04:00
|
|
|
#
|
|
|
|
# Executes commands at login post-zshrc.
|
|
|
|
#
|
|
|
|
# Authors:
|
|
|
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
|
|
|
#
|
|
|
|
|
2012-05-27 20:08:40 -04:00
|
|
|
# Execute code that does not affect the current session in the background.
|
|
|
|
{
|
|
|
|
# Compile the completion dump to increase startup speed.
|
2012-09-03 16:13:53 -04:00
|
|
|
zcompdump="${ZDOTDIR:-$HOME}/.zcompdump"
|
2012-12-11 21:37:17 -08:00
|
|
|
if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then
|
2012-09-01 17:53:06 -04:00
|
|
|
zcompile "$zcompdump"
|
2012-05-27 20:08:40 -04:00
|
|
|
fi
|
|
|
|
} &!
|
2012-05-27 17:04:01 -04:00
|
|
|
|
2016-08-23 10:31:34 -05:00
|
|
|
# Execute code only if STDERR is bound to a TTY.
|
2020-01-11 09:48:45 +01:00
|
|
|
if [[ -o INTERACTIVE && -t 2 ]]; then
|
2016-08-23 10:31:34 -05:00
|
|
|
|
|
|
|
# Print a random, hopefully interesting, adage.
|
|
|
|
if (( $+commands[fortune] )); then
|
2013-07-06 11:28:53 -05:00
|
|
|
fortune -s
|
2014-05-07 09:57:21 -05:00
|
|
|
print
|
|
|
|
fi
|
2016-08-23 10:31:34 -05:00
|
|
|
|
2020-01-11 09:48:45 +01:00
|
|
|
fi >&2
|