Commit a58d8cf02b9c42adb66324d37e381f857e4f1914

Authored by Shrikant Sharat
1 parent b84ae117e2

Simplify loading prezto plugins with pmodload.

Showing 1 changed file with 4 additions and 4 deletions Side-by-side Diff

... ... @@ -275,11 +275,11 @@ antigen-revert () {
275 275 elif [[ -f $location/init.zsh ]]; then
276 276 # If we have a `init.zsh`
277 277 if (( $+functions[pmodload] )); then
278   - # if pmodload is defined pmodload the module.
279   - local module="$(echo $loc|sed -e 's/^modules\///')" #remove modules/ from loc to find module name
280   - pmodload "$module"
  278 + # If pmodload is defined pmodload the module. Remove `modules/`
  279 + # from loc to find module name.
  280 + pmodload "${loc#modules/}"
281 281 else
282   - # otherwise source it.
  282 + # Otherwise source it.
283 283 source "$location/init.zsh"
284 284 fi
285 285