Fix spack install --v[tab] spec (#28278)

This commit is contained in:
Harmen Stoppels
2022-01-06 14:47:03 +01:00
committed by GitHub
parent f8d4b4746c
commit f0b70b7c8e
3 changed files with 12 additions and 2 deletions

View File

@@ -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