diff --git a/bash_completion b/bash_completion index 0e319ebf521..fa472201cd6 100644 --- a/bash_completion +++ b/bash_completion @@ -875,10 +875,7 @@ _comp_ltrim_colon_completions() if [[ $1 == *:* && $COMP_WORDBREAKS == *:* ]]; then # Remove colon-word prefix from COMPREPLY items local colon_word=${1%"${1##*:}"} - COMPREPLY=("${COMPREPLY[@]}") - while ((i-- > 0)); do - COMPREPLY[i]=${COMPREPLY[i]#"$colon_word"} - done + COMPREPLY=("${COMPREPLY[@]#"$colon_word"}") fi } # _comp_ltrim_colon_completions()