From b2bf9b7a2d72f91d75f2222a70d54eaeb8b04d61 Mon Sep 17 00:00:00 2001 From: Till Höppner Date: Mon, 15 May 2017 14:28:36 +0200 Subject: Ditch zplug for manual management --- .gitmodules | 11 +++++++---- plugins/01-fast-syntax-highlighting | 1 + plugins/02-zsh-history-substring-search | 1 + plugins/03-zsh-autosuggestions | 1 + plugins/fast-syntax-highlighting | 1 - zplug | 1 - zshrc | 30 ++++++++++++++++++++---------- 7 files changed, 30 insertions(+), 16 deletions(-) create mode 160000 plugins/01-fast-syntax-highlighting create mode 160000 plugins/02-zsh-history-substring-search create mode 160000 plugins/03-zsh-autosuggestions delete mode 160000 plugins/fast-syntax-highlighting delete mode 160000 zplug diff --git a/.gitmodules b/.gitmodules index 9e01c66..817de0a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,9 @@ -[submodule "zplug"] - path = zplug - url = gh:zplug/zplug [submodule "plugins/fast-syntax-highlighting"] - path = plugins/fast-syntax-highlighting + path = plugins/01-fast-syntax-highlighting url = https://github.com/zdharma/fast-syntax-highlighting +[submodule "plugins/zsh-autosuggestions"] + path = plugins/03-zsh-autosuggestions + url = https://github.com/zsh-users/zsh-autosuggestions +[submodule "plugins/zsh-history-substring-search"] + path = plugins/02-zsh-history-substring-search + url = https://github.com/zsh-users/zsh-history-substring-search diff --git a/plugins/01-fast-syntax-highlighting b/plugins/01-fast-syntax-highlighting new file mode 160000 index 0000000..7d6524e --- /dev/null +++ b/plugins/01-fast-syntax-highlighting @@ -0,0 +1 @@ +Subproject commit 7d6524e6fbdfa6c3bdd5cf840f6aac0bd39f514d diff --git a/plugins/02-zsh-history-substring-search b/plugins/02-zsh-history-substring-search new file mode 160000 index 0000000..c750a17 --- /dev/null +++ b/plugins/02-zsh-history-substring-search @@ -0,0 +1 @@ +Subproject commit c750a17757478686b671f6cdd3f2fc3cfb078edf diff --git a/plugins/03-zsh-autosuggestions b/plugins/03-zsh-autosuggestions new file mode 160000 index 0000000..fedc22e --- /dev/null +++ b/plugins/03-zsh-autosuggestions @@ -0,0 +1 @@ +Subproject commit fedc22e9bbd046867860e772d7d6787f5dae9d4c diff --git a/plugins/fast-syntax-highlighting b/plugins/fast-syntax-highlighting deleted file mode 160000 index 7d6524e..0000000 --- a/plugins/fast-syntax-highlighting +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7d6524e6fbdfa6c3bdd5cf840f6aac0bd39f514d diff --git a/zplug b/zplug deleted file mode 160000 index 06c6f33..0000000 --- a/zplug +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 06c6f33bf1543f30d26835867fb73d599e060d04 diff --git a/zshrc b/zshrc index f410736..5385352 100644 --- a/zshrc +++ b/zshrc @@ -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 -- cgit v1.2.3