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