diff --git a/antigen.zsh b/antigen.zsh index bec36af..e8de478 100644 --- a/antigen.zsh +++ b/antigen.zsh @@ -138,20 +138,31 @@ antigen-revert () { # Takes a repo url and gives out the path that this url needs to be cloned # to. Doesn't actually clone anything. echo -n $ADOTDIR/repos/ - echo "$1" | sed \ + # prezto pmodload workaround + if [[ "$1" == "https://github.com/sorin-ionescu/prezto.git" ]];then + echo -n .zprezto + else + echo -n "$1" | sed \ -e 's./.-SLASH-.g' \ -e 's.:.-COLON-.g' \ -e 's.|.-PIPE-.g' + fi } -antigen-get-clone-url () { # Takes a repo's clone dir and gives out the repo's original url that was # used to create the given directory path. - echo "$1" | sed \ + + # prezto pmodload workaround + if [[ "$1" == ".zprezto" ]];then + echo -n https://github.com/sorin-ionescu/prezto.git + else + echo -n "$1" | sed \ -e "s:^$ADOTDIR/repos/::" \ -e 's.-SLASH-./.g' \ -e 's.-COLON-.:.g' \ -e 's.-PIPE-.|.g' + fi } -antigen-ensure-repo () { @@ -240,10 +251,15 @@ antigen-revert () { # FIXME: I don't know. Looks very very ugly. Needs a better # implementation once tests are ready. local script_loc="$(ls "$location" | grep -m1 '\.plugin\.zsh$')" + local init_loc="$(ls "$location" | grep -m1 '\.init\.zsh$')" if [[ -f $location/$script_loc ]]; then # If we have a `*.plugin.zsh`, source it. source "$location/$script_loc" + + elif [[ -f $location/$init_loc ]]; then + # If we have a `*.init.zsh`, source it. + source "$location/$init_loc" elif ls "$location" | grep -qm1 '\.zsh$'; then # If there is no `*.plugin.zsh` file, source *all* the `*.zsh` @@ -318,6 +334,11 @@ antigen-lib () { antigen-bundle --loc=lib } +antigen-prezto-lib() { + antigen-bundle sorin-ionescu/prezto + export ZDOTDIR=$ADOTDIR/repos/ +} + antigen-theme () { if [[ "$1" != */* && "$1" != --* ]]; then