From d1d1c538f7b4b6a0ae0ad0cd815c92980ae7028c Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Date: Wed, 9 Jan 2013 10:26:29 +0530 Subject: [PATCH] Mild refactoring. --- antigen.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/antigen.zsh b/antigen.zsh index aa32ff2..30ec66f 100644 --- a/antigen.zsh +++ b/antigen.zsh @@ -245,12 +245,12 @@ antigen-revert () { # If we have a `*.plugin.zsh`, source it. source "$script_loc" - elif [[ ! -z "$(ls "$location" | grep -m1 '\.zsh$')" ]]; then + elif ls "$location" | grep -qm1 '\.zsh$'; then # If there is no `*.plugin.zsh` file, source *all* the `*.zsh` # files. for script ($location/*.zsh(N)) source "$script" - elif [[ ! -z "$(ls "$location" | grep -m1 '\.sh$')" ]]; then + elif ls "$location" | grep -qm1 '\.sh$'; then # If there are no `*.zsh` files either, we look for and source any # `*.sh` files instead. for script ($location/*.sh(N)) source "$script" -- 2.0.0