diff --git a/lib/completion.zsh b/lib/completion.zsh index 9c2dfecca..fdd0a8536 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -8,9 +8,6 @@ setopt always_to_end WORDCHARS='' -autoload -U compinit -compinit -i - zmodload -i zsh/complist ## case-insensitive (all),partial-word and then substring completion diff --git a/lib/key-bindings.zsh b/lib/key-bindings.zsh index 7196a88ff..c7ad907d7 100644 --- a/lib/key-bindings.zsh +++ b/lib/key-bindings.zsh @@ -1,6 +1,4 @@ # TODO: Explain what some of this does.. -autoload -U compinit -compinit -i bindkey -e bindkey '\ew' kill-region diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 291772dfe..bf108afce 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -7,12 +7,23 @@ fpath=($ZSH/functions $fpath) # TIP: Add files you don't want in git to .gitignore for config_file ($ZSH/lib/*.zsh) source $config_file -# Load all of your custom configurations from custom/ -for config_file ($ZSH/custom/*.zsh) source $config_file +# Add all defined plugins to fpath +plugin=${plugin:=()} +for plugin ($plugins) fpath=($ZSH/plugins/$plugin $fpath) + +# Load and run compinit +autoload -U compinit +compinit -i # Load all of the plugins that were defined in ~/.zshrc -plugin=${plugin:=()} -for plugin ($plugins) source $ZSH/plugins/$plugin/$plugin.plugin.zsh +for plugin ($plugins); do + if [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then + source $ZSH/plugins/$plugin/$plugin.plugin.zsh + fi +done + +# Load all of your custom configurations from custom/ +for config_file ($ZSH/custom/*.zsh) source $config_file # Load the theme source "$ZSH/themes/$ZSH_THEME.zsh-theme" diff --git a/plugins/brew/brew.plugin.zsh b/plugins/brew/brew.plugin.zsh deleted file mode 100644 index 353a18942..000000000 --- a/plugins/brew/brew.plugin.zsh +++ /dev/null @@ -1,4 +0,0 @@ -# add brew completion function to path -fpath=($ZSH/plugins/brew $fpath) -autoload -U compinit -compinit -i diff --git a/plugins/cpanm/cpanm.plugin.zsh b/plugins/cpanm/cpanm.plugin.zsh deleted file mode 100644 index af52d3e8b..000000000 --- a/plugins/cpanm/cpanm.plugin.zsh +++ /dev/null @@ -1,4 +0,0 @@ -# add cpanm completion function to path -fpath=($ZSH/plugins/cpanm $fpath) -autoload -U compinit -compinit -i diff --git a/plugins/gem/gem.plugin.zsh b/plugins/gem/gem.plugin.zsh deleted file mode 100644 index d4e5c6584..000000000 --- a/plugins/gem/gem.plugin.zsh +++ /dev/null @@ -1,4 +0,0 @@ -# add gem completion function to path -fpath=($ZSH/plugins/gem $fpath) -autoload -U compinit -compinit -i diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh index 8d4580654..df7053ba7 100644 --- a/plugins/github/github.plugin.zsh +++ b/plugins/github/github.plugin.zsh @@ -5,7 +5,3 @@ if [ "$commands[(I)hub]" ]; then function git(){hub "$@"} fi -# add github completion function to path -fpath=($ZSH/plugins/github $fpath) -autoload -U compinit -compinit -i diff --git a/plugins/macports/macports.plugin.zsh b/plugins/macports/macports.plugin.zsh index cbbc49265..277352e32 100644 --- a/plugins/macports/macports.plugin.zsh +++ b/plugins/macports/macports.plugin.zsh @@ -6,7 +6,3 @@ alias puni="sudo port uninstall inactive" alias puo="sudo port upgrade outdated" alias pup="psu && puo" -# add macports completion function to path -fpath=($ZSH/plugins/macports $fpath) -autoload -U compinit -compinit -i diff --git a/plugins/npm/npm.plugin.zsh b/plugins/npm/npm.plugin.zsh deleted file mode 100644 index 826f0f7b0..000000000 --- a/plugins/npm/npm.plugin.zsh +++ /dev/null @@ -1,4 +0,0 @@ -# add npm completion function to path -fpath=($ZSH/plugins/npm $fpath) -autoload -U compinit -compinit -i diff --git a/plugins/pip/pip.plugin.zsh b/plugins/pip/pip.plugin.zsh deleted file mode 100644 index bf9f23968..000000000 --- a/plugins/pip/pip.plugin.zsh +++ /dev/null @@ -1,4 +0,0 @@ -# add brew completion function to path -fpath=($ZSH/plugins/pip $fpath) -autoload -U compinit -compinit -i diff --git a/plugins/redis-cli/redis-cli.plugin.zsh b/plugins/redis-cli/redis-cli.plugin.zsh deleted file mode 100644 index af5a843c9..000000000 --- a/plugins/redis-cli/redis-cli.plugin.zsh +++ /dev/null @@ -1,4 +0,0 @@ -# add redis completion function to path -fpath=($ZSH/plugins/redis-cli $fpath) -autoload -U compinit -compinit -i diff --git a/plugins/vagrant/vagrant.plugin.zsh b/plugins/vagrant/vagrant.plugin.zsh deleted file mode 100644 index 5e9bcf10a..000000000 --- a/plugins/vagrant/vagrant.plugin.zsh +++ /dev/null @@ -1,3 +0,0 @@ -fpath=($ZSH/plugins/vagrant $fpath) -autoload -U compinit -compinit -i