Commit 17f8e971e39af0844eaf3fa85470cb5bd09a814c
1 parent
aa1012e7f8
Work with non zsh-only plugins/scripts.
Plugins that are compatible with both bash and zsh don't obviously have a `.zsh` extenstion. They use a `.sh` extension. We now support this. Example: rupa/z
Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff
antigen.zsh
... | ... | @@ -143,6 +143,10 @@ antigen-update () { |
143 | 143 | # If there is no `*.plugin.zsh` file, source *all* the `*.zsh` |
144 | 144 | # files. |
145 | 145 | for script ($location/*.zsh) source "$script" |
146 | + elif [[ ! -z "$(ls "$location" | grep -m1 '.sh$')" ]]; then | |
147 | + # If there are no `*.zsh` files either, we look for and source any | |
148 | + # `*.sh` files instead. | |
149 | + for script ($location/*.sh) source "$script" | |
146 | 150 | fi |
147 | 151 | |
148 | 152 | # Add to $fpath, for completion(s) |