From a58d8cf02b9c42adb66324d37e381f857e4f1914 Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Date: Fri, 22 Feb 2013 09:46:02 +0530 Subject: [PATCH] Simplify loading prezto plugins with pmodload. --- antigen.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/antigen.zsh b/antigen.zsh index 7356db9..2a6d56f 100644 --- a/antigen.zsh +++ b/antigen.zsh @@ -275,11 +275,11 @@ antigen-revert () { elif [[ -f $location/init.zsh ]]; then # If we have a `init.zsh` if (( $+functions[pmodload] )); then - # if pmodload is defined pmodload the module. - local module="$(echo $loc|sed -e 's/^modules\///')" #remove modules/ from loc to find module name - pmodload "$module" + # If pmodload is defined pmodload the module. Remove `modules/` + # from loc to find module name. + pmodload "${loc#modules/}" else - # otherwise source it. + # Otherwise source it. source "$location/init.zsh" fi -- 2.0.0