diff options
author | Till Höppner | 2017-05-15 14:28:36 +0200 |
---|---|---|
committer | Till Höppner | 2017-05-15 14:28:36 +0200 |
commit | b2bf9b7a2d72f91d75f2222a70d54eaeb8b04d61 (patch) | |
tree | a60bf585bcdd84ffa3d709dafde8ea1a79ff40c6 /zshrc | |
parent | ddbd1887ed527c87cca969c0e3e0f48afcf4b4fb (diff) | |
download | zsh-b2bf9b7a2d72f91d75f2222a70d54eaeb8b04d61.tar.gz zsh-b2bf9b7a2d72f91d75f2222a70d54eaeb8b04d61.tar.xz zsh-b2bf9b7a2d72f91d75f2222a70d54eaeb8b04d61.zip |
Ditch zplug for manual management
Diffstat (limited to 'zshrc')
-rw-r--r-- | zshrc | 30 |
1 files changed, 20 insertions, 10 deletions
@@ -1,14 +1,24 @@ -source /cfg/zsh/zplug/init.zsh +# Determine location of this file from the assumption that +# it is linked to ~/.zshrc. This is required to find the +# config files and plugins located relative to this file -zstyle ':zplug:tag' 'from' 'local' +# directory this file is in +CFG_DIR=$(dirname $(readlink -f ~/.zshrc)) -zplug 'zdharma/fast-syntax-highlighting' - -if ! zplug check --verbose; then - printf "Install? [y/N]: " - if read -q; then - echo; zplug install +for plugin in $CFG_DIR/plugins/*(N); do + # add *.zsh if no *.plugin.zsh found + local files=( $plugin/*.plugin.zsh(N) ) + if [ ${#files[@]} -eq 0 ]; then + files=( $plugin/*.zsh(N) ) fi -fi + + for file in $files; source $file + fpath=($fpath $plugin) +done + +fpath=($CFG_DIR/functions $fpath) +for fn in $CFG_DIR/functions/*(.N); autoload $(basename $fn) -zplug load --verbose +for conf in $CFG_DIR/conf.d/*(.N); do + source "$conf" +done |