Commit d1d1c538f7b4b6a0ae0ad0cd815c92980ae7028c
1 parent
37b9bb1e4f
Mild refactoring.
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
antigen.zsh
... | ... | @@ -245,12 +245,12 @@ antigen-revert () { |
245 | 245 | # If we have a `*.plugin.zsh`, source it. |
246 | 246 | source "$script_loc" |
247 | 247 | |
248 | - elif [[ ! -z "$(ls "$location" | grep -m1 '\.zsh$')" ]]; then | |
248 | + elif ls "$location" | grep -qm1 '\.zsh$'; then | |
249 | 249 | # If there is no `*.plugin.zsh` file, source *all* the `*.zsh` |
250 | 250 | # files. |
251 | 251 | for script ($location/*.zsh(N)) source "$script" |
252 | 252 | |
253 | - elif [[ ! -z "$(ls "$location" | grep -m1 '\.sh$')" ]]; then | |
253 | + elif ls "$location" | grep -qm1 '\.sh$'; then | |
254 | 254 | # If there are no `*.zsh` files either, we look for and source any |
255 | 255 | # `*.sh` files instead. |
256 | 256 | for script ($location/*.sh(N)) source "$script" |