dotfiles/.zsh/.zlogin

44 lines
1006 B
Plaintext
Raw Normal View History

2020-06-02 15:59:14 +02:00
## $ZDOTDIR/.zlogin - Contains commands that should be executed only in login shells
2020-07-02 15:14:24 +02:00
## Load config files in $ZSH/lib that for stage 3
2020-06-02 15:59:14 +02:00
for config_file ($ZDOTDIR/lib/30-*.zsh) source $config_file
## Run tasks in background
(
#Initalize and compile completion cache
autoload -Uz compinit
compinit
2020-07-02 15:14:24 +02:00
## Compile startup files
2020-06-02 15:59:14 +02:00
autoload -Uz zrecompile
for ((i=1; i <= $#fpath; ++i)); do
dir=$fpath[i]
zwc=${dir:t}.zwc
if [[ $dir == (.|..) || $dir == (.|..)/* ]]; then
continue
fi
files=($dir/*(N-.))
if [[ -w $dir:h && -n $files ]]; then
files=(${${(M)files%/*/*}#/})
if ( cd $dir:h &&
zrecompile -p -U -z $zwc $files ); then
fpath[i]=$fpath[i].zwc
fi
fi
done
)
## If tmux session is nested, source modified config (e.g. for overwriting styles)
2020-07-03 16:41:44 +02:00
if [[ "${SSH_CONNECTION}" ]] && [[ "${TMUX}" ]]; then
tmux source-file ~/.tmux.nested.conf
fi
2020-07-02 15:14:24 +02:00
## Update or install vim plugins
#vim -i NONE +PlugUpdate +PlugClean! +qal
2020-07-02 15:14:24 +02:00
2020-06-02 15:59:14 +02:00
## Print some system info
uname -npsr
uptime