From 993e05da50543b9c2dcc5e4fedb93afd1c8b020c Mon Sep 17 00:00:00 2001 From: Pat Regan Date: Fri, 8 Apr 2011 10:12:22 -0400 Subject: [PATCH] Replace redundant calls to compinit with a single call. --- lib/completion.zsh | 3 --- lib/key-bindings.zsh | 2 -- oh-my-zsh.sh | 4 ++++ plugins/brew/brew.plugin.zsh | 2 -- plugins/cpanm/cpanm.plugin.zsh | 2 -- plugins/gem/gem.plugin.zsh | 2 -- plugins/github/github.plugin.zsh | 2 -- plugins/macports/macports.plugin.zsh | 2 -- plugins/pip/pip.plugin.zsh | 2 -- plugins/vagrant/vagrant.plugin.zsh | 2 -- 10 files changed, 4 insertions(+), 19 deletions(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index e8e9776a5..3c5a41e14 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 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..805e92428 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -17,6 +17,10 @@ for plugin ($plugins) source $ZSH/plugins/$plugin/$plugin.plugin.zsh # Load the theme source "$ZSH/themes/$ZSH_THEME.zsh-theme" +# Load and run compinit +autoload -U compinit +compinit -i + # Check for updates on initial load... if [ "$DISABLE_AUTO_UPDATE" = "true" ] then diff --git a/plugins/brew/brew.plugin.zsh b/plugins/brew/brew.plugin.zsh index 353a18942..079c0fba0 100644 --- a/plugins/brew/brew.plugin.zsh +++ b/plugins/brew/brew.plugin.zsh @@ -1,4 +1,2 @@ # 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 index af52d3e8b..8425b5ad8 100644 --- a/plugins/cpanm/cpanm.plugin.zsh +++ b/plugins/cpanm/cpanm.plugin.zsh @@ -1,4 +1,2 @@ # 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 index d4e5c6584..cdfad7ad6 100644 --- a/plugins/gem/gem.plugin.zsh +++ b/plugins/gem/gem.plugin.zsh @@ -1,4 +1,2 @@ # 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 c23504b85..0858783cc 100644 --- a/plugins/github/github.plugin.zsh +++ b/plugins/github/github.plugin.zsh @@ -1,4 +1,2 @@ # 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..492a665b5 100644 --- a/plugins/macports/macports.plugin.zsh +++ b/plugins/macports/macports.plugin.zsh @@ -8,5 +8,3 @@ alias pup="psu && puo" # add macports completion function to path fpath=($ZSH/plugins/macports $fpath) -autoload -U compinit -compinit -i diff --git a/plugins/pip/pip.plugin.zsh b/plugins/pip/pip.plugin.zsh index bf9f23968..740f96207 100644 --- a/plugins/pip/pip.plugin.zsh +++ b/plugins/pip/pip.plugin.zsh @@ -1,4 +1,2 @@ # 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 index 5e9bcf10a..98d2d705c 100644 --- a/plugins/vagrant/vagrant.plugin.zsh +++ b/plugins/vagrant/vagrant.plugin.zsh @@ -1,3 +1 @@ fpath=($ZSH/plugins/vagrant $fpath) -autoload -U compinit -compinit -i