summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xshare/spack/bash/spack-completion.bash2
-rwxr-xr-xshare/spack/spack-completion.bash2
2 files changed, 2 insertions, 2 deletions
diff --git a/share/spack/bash/spack-completion.bash b/share/spack/bash/spack-completion.bash
index 49c691be4c..9a5b367be7 100755
--- a/share/spack/bash/spack-completion.bash
+++ b/share/spack/bash/spack-completion.bash
@@ -370,7 +370,7 @@ _spack_compress_aliases() {
# If there are zero or one completions, don't do anything
# If this isn't the first argument, bail because aliases currently only apply
# to top-level commands.
- if [ "${#COMPREPLY[@]}" -le "1" ] || [ "$COMP_CWORD" != "1" ]; then
+ if [ "${#COMPREPLY[@]}" -le "1" ] || [ "$COMP_CWORD_NO_FLAGS" != "1" ]; then
return
fi
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash
index 84b6c3dc1f..91ed9dd172 100755
--- a/share/spack/spack-completion.bash
+++ b/share/spack/spack-completion.bash
@@ -370,7 +370,7 @@ _spack_compress_aliases() {
# If there are zero or one completions, don't do anything
# If this isn't the first argument, bail because aliases currently only apply
# to top-level commands.
- if [ "${#COMPREPLY[@]}" -le "1" ] || [ "$COMP_CWORD" != "1" ]; then
+ if [ "${#COMPREPLY[@]}" -le "1" ] || [ "$COMP_CWORD_NO_FLAGS" != "1" ]; then
return
fi