summaryrefslogtreecommitdiff
path: root/share/spack/spack-completion.bash
diff options
context:
space:
mode:
Diffstat (limited to 'share/spack/spack-completion.bash')
-rwxr-xr-xshare/spack/spack-completion.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash
index 753767a3de..08ea6751f3 100755
--- a/share/spack/spack-completion.bash
+++ b/share/spack/spack-completion.bash
@@ -123,7 +123,7 @@ _bash_completion_spack() {
# If the cursor is in the middle of the line, like:
# `spack -d [] install`
# COMP_WORDS will not contain the empty character, so we have to add it.
- if [[ "${COMP_LINE:$COMP_POINT:1}" == " " ]]
+ if [[ "${COMP_LINE:$COMP_POINT-1:1}" == " " ]]
then
cur=""
fi