Skip to content

Commit 0a479ab

Browse files
committed
refactor(_comp_ltrim_colon_completions): simplify implementation
1 parent cac2724 commit 0a479ab

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

bash_completion

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -875,10 +875,7 @@ _comp_ltrim_colon_completions()
875875
if [[ $1 == *:* && $COMP_WORDBREAKS == *:* ]]; then
876876
# Remove colon-word prefix from COMPREPLY items
877877
local colon_word=${1%"${1##*:}"}
878-
COMPREPLY=("${COMPREPLY[@]}")
879-
while ((i-- > 0)); do
880-
COMPREPLY[i]=${COMPREPLY[i]#"$colon_word"}
881-
done
878+
COMPREPLY=("${COMPREPLY[@]#"$colon_word"}")
882879
fi
883880
} # _comp_ltrim_colon_completions()
884881

0 commit comments

Comments
 (0)