diff options
-rw-r--r-- | .gitmodules | 11 | ||||
m--------- | plugins/01-fast-syntax-highlighting (renamed from plugins/fast-syntax-highlighting) | 0 | ||||
m--------- | plugins/02-zsh-history-substring-search | 0 | ||||
m--------- | plugins/03-zsh-autosuggestions | 0 | ||||
m--------- | zplug | 0 | ||||
-rw-r--r-- | zshrc | 30 |
6 files changed, 27 insertions, 14 deletions
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/fast-syntax-highlighting b/plugins/01-fast-syntax-highlighting -Subproject 7d6524e6fbdfa6c3bdd5cf840f6aac0bd39f514 +Subproject 7d6524e6fbdfa6c3bdd5cf840f6aac0bd39f514 diff --git a/plugins/02-zsh-history-substring-search b/plugins/02-zsh-history-substring-search new file mode 160000 +Subproject c750a17757478686b671f6cdd3f2fc3cfb078ed diff --git a/plugins/03-zsh-autosuggestions b/plugins/03-zsh-autosuggestions new file mode 160000 +Subproject fedc22e9bbd046867860e772d7d6787f5dae9d4 diff --git a/zplug b/zplug deleted file mode 160000 -Subproject 06c6f33bf1543f30d26835867fb73d599e060d0 @@ -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 |