prezto/runcoms/zlogin

27 lines
628 B
Plaintext
Raw Normal View History

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