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 authored and scop committed Apr 21, 2023
1 parent 0eea357 commit e923e7f
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 @@ -895,7 +895,10 @@ _comp_delimited()
_comp_compgen COMPREPLY "$@" -- "${cur##*"$delimiter"}"
fi

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

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

0 comments on commit e923e7f

Please sign in to comment.