From ac2ee3ec954b81e739d5783e11ce3cf5c16aa2f4 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Wed, 11 Apr 2012 12:50:24 -0400 Subject: [PATCH] Improve the formatting of the autoload loop --- helper.zsh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/helper.zsh b/helper.zsh index 6dc378e3..b127bc96 100644 --- a/helper.zsh +++ b/helper.zsh @@ -28,6 +28,7 @@ function autoloadable { # Loads Oh My Zsh modules. function omodload { local omodule + local ofunction # Extended globbing is needed for autoloading of module functions. setopt EXTENDED_GLOB @@ -36,10 +37,11 @@ function omodload { fpath=(${argv:+${OMZ}/modules/${^argv}/functions(/FN)} $fpath) # Load Oh My Zsh functions. - for ofunction in $OMZ/modules/${^argv}/functions/^([_.]*|prompt_*_setup|README*)(.N:t); do + for ofunction in \ + $OMZ/modules/${^argv}/functions/^([_.]*|prompt_*_setup|README*)(.N:t) + do autoload -Uz "$ofunction" done - unset ofunction # Extended globbing is no longer needed. unsetopt EXTENDED_GLOB