From f776af2a1f5d5ced17bdeb00f7adb64ccfaa99a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Wed, 30 Sep 2020 19:00:51 +0200 Subject: [PATCH] Remove redundant bashcompinit calls Fixes #9246 --- plugins/aws/aws.plugin.zsh | 1 - plugins/compleat/compleat.plugin.zsh | 7 ++----- plugins/drush/drush.plugin.zsh | 2 -- plugins/stack/stack.plugin.zsh | 1 - plugins/wp-cli/wp-cli.plugin.zsh | 1 - 5 files changed, 2 insertions(+), 10 deletions(-) diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index 7994963c3..ecf78b2c2 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -64,7 +64,6 @@ fi # AWS CLI v2 comes with its own autocompletion. Check if that is there, otherwise fall back if command -v aws_completer &> /dev/null; then - autoload -Uz bashcompinit && bashcompinit complete -C aws_completer aws else function _awscli-homebrew-installed() { diff --git a/plugins/compleat/compleat.plugin.zsh b/plugins/compleat/compleat.plugin.zsh index 38f1b396a..247240c20 100644 --- a/plugins/compleat/compleat.plugin.zsh +++ b/plugins/compleat/compleat.plugin.zsh @@ -10,11 +10,8 @@ if (( ${+commands[compleat]} )); then local setup="${prefix}/share/compleat-1.0/compleat_setup" if [[ -f "$setup" ]]; then - if ! bashcompinit >/dev/null 2>&1; then - autoload -U bashcompinit - bashcompinit -i - fi - source "$setup" fi + + unset prefix setup fi diff --git a/plugins/drush/drush.plugin.zsh b/plugins/drush/drush.plugin.zsh index 8a20d79f2..178750c24 100644 --- a/plugins/drush/drush.plugin.zsh +++ b/plugins/drush/drush.plugin.zsh @@ -99,6 +99,4 @@ alias drvg="drush variable-get" alias drvs="drush variable-set" # Enable drush autocomplete support -autoload bashcompinit -bashcompinit source $(dirname $0)/drush.complete.sh diff --git a/plugins/stack/stack.plugin.zsh b/plugins/stack/stack.plugin.zsh index 45ef38761..e3b6503a5 100644 --- a/plugins/stack/stack.plugin.zsh +++ b/plugins/stack/stack.plugin.zsh @@ -1,4 +1,3 @@ (( $+commands[stack] )) || return -autoload -U +X bashcompinit && bashcompinit source <(stack --bash-completion-script stack) diff --git a/plugins/wp-cli/wp-cli.plugin.zsh b/plugins/wp-cli/wp-cli.plugin.zsh index 97bed406e..05ecc4b8a 100644 --- a/plugins/wp-cli/wp-cli.plugin.zsh +++ b/plugins/wp-cli/wp-cli.plugin.zsh @@ -138,7 +138,6 @@ alias wpwm='wp widget move' alias wpwu='wp widget update' -autoload -U +X bashcompinit && bashcompinit # bash completion for the `wp` command _wp_complete() {