Skip to content

Commit de9cd55

Browse files
committed
fix(_comp_delimited): prepend prefix to all compreply args
Fixes #552. Previously prefix was only prepended if COMPREPLY only contained one argument - this commit fixes it so prefix is prepended to all arguments.
1 parent df8cdda commit de9cd55

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bash_completion

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,10 @@ _comp_delimited()
833833
COMPREPLY=($(compgen "$@" -- "${cur##*"$delimiter"}"))
834834
fi
835835

836-
((${#COMPREPLY[@]} == 1)) && COMPREPLY=(${COMPREPLY/#/$prefix})
836+
for ((i = 0; i < ${#COMPREPLY[@]}; i++)); do
837+
COMPREPLY[i]=${COMPREPLY[i]/#/$prefix}
838+
done
839+
837840
[[ $delimiter != : ]] || __ltrim_colon_completions "$cur"
838841
}
839842

0 commit comments

Comments
 (0)