Fix incorrect Bash completions after --long-opt=

This is because `$COMP_CWORD` points to that `=` "word".
This commit is contained in:
ISSOtm
2022-08-10 08:44:41 +02:00
parent 9ef7954670
commit 0105779789
4 changed files with 4 additions and 4 deletions

View File

@@ -99,7 +99,7 @@ _rgblink_completions() {
# Parse current word
# Careful that it might look like an option, so use `--` aggressively!
local cur_word="${COMP_WORDS[$COMP_CWORD]}"
local cur_word="${COMP_WORDS[$i]}"
# Process options, as short ones may change the state
if $opt_ena && [[ "$state" = 'normal' && "$cur_word" = '-'* ]]; then