Browse Source

Revert "Remove redundant bashcompinit calls"

This reverts commit f776af2a1f5d5ced17bdeb00f7adb64ccfaa99a6.

Fixes #9314
Marc Cornellà 3 years ago
parent
commit
6ebf27b8d3

+ 1 - 0
plugins/aws/aws.plugin.zsh

@@ -64,6 +64,7 @@ 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() {

+ 5 - 2
plugins/compleat/compleat.plugin.zsh

@@ -10,8 +10,11 @@ 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

+ 2 - 0
plugins/drush/drush.plugin.zsh

@@ -99,4 +99,6 @@ alias drvg="drush variable-get"
 alias drvs="drush variable-set"
 
 # Enable drush autocomplete support
+autoload bashcompinit
+bashcompinit
 source $(dirname $0)/drush.complete.sh

+ 1 - 0
plugins/stack/stack.plugin.zsh

@@ -1,3 +1,4 @@
 (( $+commands[stack] )) || return
 
+autoload -U +X bashcompinit && bashcompinit
 source <(stack --bash-completion-script stack)

+ 1 - 0
plugins/wp-cli/wp-cli.plugin.zsh

@@ -138,6 +138,7 @@ alias wpwm='wp widget move'
 alias wpwu='wp widget update'
 
 
+autoload -U +X bashcompinit && bashcompinit
 # bash completion for the `wp` command
 
 _wp_complete() {