Permalink
Browse files

Simplify loading prezto plugins with pmodload.

  • Loading branch information...
1 parent b84ae11 commit a58d8cf02b9c42adb66324d37e381f857e4f1914 @sharat87 sharat87 committed Feb 22, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 antigen.zsh
View
@@ -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

0 comments on commit a58d8cf

Please sign in to comment.