From 782883b5d8db1971cc14948b9c2adc51f17f8898 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 e8e9776..3c5a41e 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 7196a88..c7ad907 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 291772d..805e924 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 353a189..079c0fb 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 af52d3e..8425b5a 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 d4e5c65..cdfad7a 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 c23504b..0858783 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 cbbc492..492a665 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 bf9f239..740f962 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 5e9bcf1..98d2d70 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