diff options
author | Alan Pearce | 2016-06-26 16:42:21 +0200 |
---|---|---|
committer | Alan Pearce | 2016-06-26 16:42:21 +0200 |
commit | 1f77e2ab95dac41dc40d6d449f92654b607f4b45 (patch) | |
tree | 9f07f8aeebb79a75869194a93c9ce775e19a7871 /hooks/post-up | |
parent | 3ec45a3b60b4d4ae0a778ed1d0e417c3a20c4d57 (diff) | |
download | nixfiles-1f77e2ab95dac41dc40d6d449f92654b607f4b45.tar.lz nixfiles-1f77e2ab95dac41dc40d6d449f92654b607f4b45.tar.zst nixfiles-1f77e2ab95dac41dc40d6d449f92654b607f4b45.zip |
Setup zplug in post-zsh hook
Diffstat (limited to 'hooks/post-up')
-rwxr-xr-x | hooks/post-up/zsh | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/hooks/post-up/zsh b/hooks/post-up/zsh index 15b6a2f0..b7a7d4a2 100755 --- a/hooks/post-up/zsh +++ b/hooks/post-up/zsh @@ -21,35 +21,9 @@ then mkdir -p ~/.cache/zsh fi -local -a zfiles -zfiles=($ZDOTDIR/zshrc) - -autoload -U zrecompile - -if [[ -f $ZDOTDIR/${HOST%%.*}.zsh ]]; then - zfiles+=$ZDOTDIR/${HOST%%.*}.zsh -fi -if [[ $OSTYPE == freebsd* ]]; then - zfiles+=$ZDOTDIR/freebsd.zsh -fi - -autoload -Uz compinit -compinit -u -d ~/.cache/zsh/compdump -zrecompile -p -R $ZDOTDIR/.zshrc.zwc $zfiles -- \ - -M ~/.cache/zsh/compdump - -if [[ -s $commands[fasd] ]]; then - if [[ ! -d $ZDOTDIR/functions/fasd ]]; then - mkdir $ZDOTDIR/functions/fasd - fi - if [[ ! -h $ZDOTDIR/functions/fasd/fasd ]]; then - ln -s =fasd $ZDOTDIR/functions/fasd/fasd - fi +if [[ -z $commands[zplug] && ! -d ~/projects/zplug/ ]] +then + git clone git://github.com/zplug/zplug ~/projects/zplug/ fi -for fp in $ZDOTDIR/functions/*(/); do - zrecompile -p $fp $fp/* -done - -[[ -f ~/.zsh/fasd-data ]] && mv ~/.zsh/fasd-data ~/.cache/zsh/fasd-data -[[ -f ~/.zsh/history ]] && mv ~/.zsh/history ~/.cache/zsh/history +zsh -ic "zplug install" |