Skip to content

Commit d84f1ec

Browse files
committed
fix(_comp_delimited): work around bash-4.2 quoting
1 parent 6c8eb52 commit d84f1ec

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

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[@]})) && COMPREPLY=("${COMPREPLY[@]/#/"$prefix"}")
836+
local i
837+
for i in "${!COMPREPLY[@]}"; do
838+
COMPREPLY[i]=${COMPREPLY[i]/#/"$prefix"}
839+
done
837840

838841
[[ $delimiter != : ]] || __ltrim_colon_completions "$cur"
839842
}

0 commit comments

Comments
 (0)