Skip to content

Commit

Permalink
fix(_comp_delimited): work around bash-4.2 quoting
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Apr 8, 2023
1 parent 6c8eb52 commit d84f1ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,10 @@ _comp_delimited()
COMPREPLY=($(compgen "$@" -- "${cur##*"$delimiter"}"))
fi

((${#COMPREPLY[@]})) && COMPREPLY=("${COMPREPLY[@]/#/"$prefix"}")
local i
for i in "${!COMPREPLY[@]}"; do
COMPREPLY[i]=${COMPREPLY[i]/#/"$prefix"}
done

[[ $delimiter != : ]] || __ltrim_colon_completions "$cur"
}
Expand Down

0 comments on commit d84f1ec

Please sign in to comment.