Skip to content

Commit

Permalink
42037: COMP_POINT for bash completion was miscalculated.
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Stephenson committed Nov 20, 2017
1 parent 0993921 commit e2f793e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2017-11-20 Peter Stephenson <p.stephenson@samsung.com>

* Evan Underscore / pws: 42037: Completion/bashcompinit: recent
change caused wrong word to be used for COMP_POINT.

2017-11-13 Oliver Kiddle <opk@zsh.org>

* 42019: Completion/Unix/Command/_git: update options to 2.15
Expand Down
2 changes: 1 addition & 1 deletion Completion/bashcompinit
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ _bash_complete() {
local -x COMP_LINE="$words"
local -A savejobstates savejobtexts

(( COMP_POINT = 1 + ${#${(j. .)words[1,CURRENT]}} + $#QIPREFIX + $#IPREFIX + $#PREFIX ))
(( COMP_POINT = 1 + ${#${(j. .)words[1,CURRENT-1]}} + $#QIPREFIX + $#IPREFIX + $#PREFIX ))
(( COMP_CWORD = CURRENT - 1))
COMP_WORDS=( $words )
BASH_VERSINFO=( 2 05b 0 1 release )
Expand Down

0 comments on commit e2f793e

Please # to comment.