From cd68a349f7019b53284af75b5a7140d033d54f18 Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Date: Mon, 16 Jul 2012 15:34:43 +0530 Subject: [PATCH] Fix update to zsh-completions break -antigen-load. The globs looking for *.zsh, *.sh etc. files is incorrect. It needs `\.` instead of `.`. Also added the NULL_GLOB option to the patterns as (N), so that there wouldn't be an error if there are no files matching the pattern. Fix taken from https://github.com/sharat87/oh-my-zsh/commit/51c55ad17e23db89e72424add0c34fa20654cd8f --- antigen.zsh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 -- 2.0.0