diff --git a/antigen.zsh b/antigen.zsh index 0f02b97..26e38cb 100644 --- a/antigen.zsh +++ b/antigen.zsh @@ -193,21 +193,21 @@ antigen-update () { # Source the plugin script # 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 script_loc="$(ls "$location" | grep -m1 '\.plugin\.zsh$')" if [[ -f $script_loc ]]; then # If we have a `*.plugin.zsh`, source it. source "$script_loc" - elif [[ ! -z "$(ls "$location" | grep -m1 '.zsh$')" ]]; then + elif [[ ! -z "$(ls "$location" | grep -m1 '\.zsh$')" ]]; then # If there is no `*.plugin.zsh` file, source *all* the `*.zsh` # files. - for script ($location/*.zsh) source "$script" + for script ($location/*.zsh(N)) source "$script" - elif [[ ! -z "$(ls "$location" | grep -m1 '.sh$')" ]]; then + elif [[ ! -z "$(ls "$location" | grep -m1 '\.sh$')" ]]; then # If there are no `*.zsh` files either, we look for and source any # `*.sh` files instead. - for script ($location/*.sh) source "$script" + for script ($location/*.sh(N)) source "$script" fi