From fd0e1efa84e4fb8d697d7694edf86dd23f95047c Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 14 Jul 2011 22:50:40 -0400 Subject: [PATCH] Run compinit before sourcing functions. --- oh-my-zsh.zsh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/oh-my-zsh.zsh b/oh-my-zsh.zsh index 2cd105b1..48e5befa 100644 --- a/oh-my-zsh.zsh +++ b/oh-my-zsh.zsh @@ -5,11 +5,6 @@ if [[ "$TERM" == 'dumb' ]]; then DISABLE_COLOR='true' fi -# Load all files in $ZSH/oh-my-zsh/lib/ that end in .zsh. -for function_file in $ZSH/functions/*.zsh; do - source "$function_file" -done - # Add all defined plugins to fpath. plugin=${plugin:=()} for plugin in $plugins; do @@ -17,8 +12,12 @@ for plugin in $plugins; do done # Load and run compinit. -autoload -U compinit -compinit -i +autoload -Uz compinit && compinit -i + +# Load all files in $ZSH/oh-my-zsh/lib/ that end in .zsh. +for function_file in $ZSH/functions/*.zsh; do + source "$function_file" +done # Load all plugins defined in ~/.zshrc. for plugin in $plugins; do