From f0275e84adcca97c6801108a94979f765cba01d2 Mon Sep 17 00:00:00 2001 From: Danny McClanahan <1305167+cosmicexplorer@users.noreply.github.com> Date: Wed, 10 Mar 2021 17:44:50 +0000 Subject: fix setup-env.sh on older linux zsh (#21721) --- share/spack/bash/spack-completion.in | 2 +- share/spack/spack-completion.bash | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'share') diff --git a/share/spack/bash/spack-completion.in b/share/spack/bash/spack-completion.in index bda2731ed5..ae9cbc555c 100755 --- a/share/spack/bash/spack-completion.in +++ b/share/spack/bash/spack-completion.in @@ -55,7 +55,7 @@ _bash_completion_spack() { # For our purposes, flags should not affect tab completion. For instance, # `spack install []` and `spack -d install --jobs 8 []` should both give the same # possible completions. Therefore, we need to ignore any flags in COMP_WORDS. - local COMP_WORDS_NO_FLAGS=() + local -a COMP_WORDS_NO_FLAGS local index=0 while [[ "$index" -lt "$COMP_CWORD" ]] do diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 62645bd6ac..c76eb7d4a8 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -55,7 +55,7 @@ _bash_completion_spack() { # For our purposes, flags should not affect tab completion. For instance, # `spack install []` and `spack -d install --jobs 8 []` should both give the same # possible completions. Therefore, we need to ignore any flags in COMP_WORDS. - local COMP_WORDS_NO_FLAGS=() + local -a COMP_WORDS_NO_FLAGS local index=0 while [[ "$index" -lt "$COMP_CWORD" ]] do -- cgit v1.2.3-70-g09d2