diff --git a/lib/completion.zsh b/lib/completion.zsh index b47c63e9..9e770f18 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -9,9 +9,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 7196a88f..c7ad907d 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 4de17d50..bf7c7da3 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -12,9 +12,20 @@ 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 the plugins that were defined in ~/.zshrc +# Add all defined plugins to fpath plugin=${plugin:=()} -for plugin ($plugins) source $ZSH/plugins/$plugin/$plugin.plugin.zsh +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 +for plugin ($plugins); do + if [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then + source $ZSH/plugins/$plugin/$plugin.plugin.zsh + fi +done # 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 353a1894..00000000 --- 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 af52d3e8..00000000 --- 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/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh index 8cc17f7d..d2b28ad1 100644 --- a/plugins/extract/extract.plugin.zsh +++ b/plugins/extract/extract.plugin.zsh @@ -2,7 +2,7 @@ # FILE: extract.plugin.zsh # DESCRIPTION: oh-my-zsh plugin file. # AUTHOR: Sorin Ionescu (sorin.ionescu@gmail.com) -# VERSION: 1.0.1 +# VERSION: 1.0.2 # ------------------------------------------------------------------------------ @@ -77,9 +77,3 @@ function extract() { } alias x=extract - -# add extract completion function to path -fpath=($ZSH/plugins/extract $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 d4e5c658..00000000 --- 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 8d458065..df7053ba 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 cbbc4926..277352e3 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 826f0f7b..00000000 --- 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 bf9f2396..00000000 --- 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/vagrant/vagrant.plugin.zsh b/plugins/vagrant/vagrant.plugin.zsh deleted file mode 100644 index 5e9bcf10..00000000 --- a/plugins/vagrant/vagrant.plugin.zsh +++ /dev/null @@ -1,3 +0,0 @@ -fpath=($ZSH/plugins/vagrant $fpath) -autoload -U compinit -compinit -i