ZSH: Beginning of reconfiguring everything
This commit is contained in:
36
.config/zsh/.zlogin
Normal file → Executable file
36
.config/zsh/.zlogin
Normal file → Executable file
@@ -1,42 +1,10 @@
|
||||
## $ZDOTDIR/.zlogin - Contains commands that should be executed only in login shells
|
||||
|
||||
## Load config files in $ZSH/lib that for stage 3
|
||||
for config_file ($ZDOTDIR/lib/30-*.zsh) source $config_file
|
||||
|
||||
## Run tasks in background
|
||||
(
|
||||
#Initalize and compile completion cache
|
||||
autoload -Uz compinit
|
||||
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
compinit -i # Ignore insecure directories
|
||||
else
|
||||
compinit
|
||||
fi
|
||||
for config_file (${ZLIBDIR}/30-*.zsh) source $config_file
|
||||
|
||||
## Compile startup files
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
## Update or install vim plugins
|
||||
#vim -i NONE +PlugUpdate +PlugClean! +qal
|
||||
zwcautocompile
|
||||
|
||||
## Print some system info
|
||||
uname -npsr
|
||||
|
||||
Reference in New Issue
Block a user