From 9a11b34101a218532f5133b78e55e48e3dbeb2e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Tue, 9 Nov 2021 12:03:59 +0100 Subject: [PATCH] fix(cli): fix check for completion files in `omz plugin load` --- lib/cli.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/cli.zsh b/lib/cli.zsh index 0b6bbc6cb..2975acb91 100644 --- a/lib/cli.zsh +++ b/lib/cli.zsh @@ -446,9 +446,9 @@ function _omz::plugin::load { fi # Check if it has completion to reload compinit - if [[ -f "$base/_$plugin" ]]; then - has_completion=1 - fi + local -a comp_files + comp_files=($base/_*(N)) + has_completion=$(( $#comp_files > 0 )) # Load the plugin if [[ -f "$base/$plugin.plugin.zsh" ]]; then