From a4725aba068cfd5ac30dfbee51d702843f81eebb Mon Sep 17 00:00:00 2001 From: LFDM <1986gh@gmail.com> Date: Sun, 5 Jan 2014 02:05:18 +0100 Subject: [PATCH] Adds the actual plugin dirs to the fpath. Actually can someone clarify this? I don't see a difference, whether I add the plugin path to fpath, the plugin file or nothing at all. Everything working fine, no matter what I do. --- oh-my-zsh.zsh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/oh-my-zsh.zsh b/oh-my-zsh.zsh index 5d2536ece..ba1c65a62 100644 --- a/oh-my-zsh.zsh +++ b/oh-my-zsh.zsh @@ -34,15 +34,17 @@ find_plugin_paths() { } initialize_completions() { - # Figure out the SHORT hostname, scutil is for OS X users local short_host + local plugin + + # Figure out the SHORT hostname, scutil is for OS X users short_host=$($(scutil --get ComputerName 2>/dev/null) || echo ${HOST/.*/}) # Save the location of the current completion dump file. ZSH_COMPDUMP="${ZDOTDIR:-${HOME}}/.zcompdump-$short_host-$ZSH_VERSION" # plugins need to be added to the functions path before compinit - fpath=($ZSH_PLUGIN_PATHS $fpath) + for plugin in $ZSH_PLUGIN_PATHS; { fpath=($(dirname $plugin) $fpath) } autoload -U compinit compinit -i -d $ZSH_COMPDUMP