Commit cd68a349f7019b53284af75b5a7140d033d54f18
1 parent
18249921c2
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
Showing 1 changed file with 5 additions and 5 deletions Side-by-side Diff
antigen.zsh
| ... | ... | @@ -193,21 +193,21 @@ antigen-update () { |
| 193 | 193 | # Source the plugin script |
| 194 | 194 | # FIXME: I don't know. Looks very very ugly. Needs a better |
| 195 | 195 | # implementation once tests are ready. |
| 196 | - local script_loc="$(ls "$location" | grep -m1 '.plugin.zsh$')" | |
| 196 | + local script_loc="$(ls "$location" | grep -m1 '\.plugin\.zsh$')" | |
| 197 | 197 | |
| 198 | 198 | if [[ -f $script_loc ]]; then |
| 199 | 199 | # If we have a `*.plugin.zsh`, source it. |
| 200 | 200 | source "$script_loc" |
| 201 | 201 | |
| 202 | - elif [[ ! -z "$(ls "$location" | grep -m1 '.zsh$')" ]]; then | |
| 202 | + elif [[ ! -z "$(ls "$location" | grep -m1 '\.zsh$')" ]]; then | |
| 203 | 203 | # If there is no `*.plugin.zsh` file, source *all* the `*.zsh` |
| 204 | 204 | # files. |
| 205 | - for script ($location/*.zsh) source "$script" | |
| 205 | + for script ($location/*.zsh(N)) source "$script" | |
| 206 | 206 | |
| 207 | - elif [[ ! -z "$(ls "$location" | grep -m1 '.sh$')" ]]; then | |
| 207 | + elif [[ ! -z "$(ls "$location" | grep -m1 '\.sh$')" ]]; then | |
| 208 | 208 | # If there are no `*.zsh` files either, we look for and source any |
| 209 | 209 | # `*.sh` files instead. |
| 210 | - for script ($location/*.sh) source "$script" | |
| 210 | + for script ($location/*.sh(N)) source "$script" | |
| 211 | 211 | |
| 212 | 212 | fi |
| 213 | 213 |