Skip to content

Commit

Permalink
refactor(_comp_ltrim_colon_completions): simplify implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed May 30, 2023
1 parent cac2724 commit 0a479ab
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -875,10 +875,7 @@ _comp_ltrim_colon_completions()
if [[ $1 == *:* && $COMP_WORDBREAKS == *:* ]]; then
# Remove colon-word prefix from COMPREPLY items
local colon_word=${1%"${1##*:}"}
COMPREPLY=("${COMPREPLY[@]}")
while ((i-- > 0)); do
COMPREPLY[i]=${COMPREPLY[i]#"$colon_word"}
done
COMPREPLY=("${COMPREPLY[@]#"$colon_word"}")
fi
} # _comp_ltrim_colon_completions()

Expand Down

0 comments on commit 0a479ab

Please sign in to comment.