diff --git a/contrib/bash_compl/_rgbasm.bash b/contrib/bash_compl/_rgbasm.bash index 80665ad8..f07a0ab4 100755 --- a/contrib/bash_compl/_rgbasm.bash +++ b/contrib/bash_compl/_rgbasm.bash @@ -130,7 +130,7 @@ _rgbasm_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 diff --git a/contrib/bash_compl/_rgbfix.bash b/contrib/bash_compl/_rgbfix.bash index eab5b05a..66972fda 100755 --- a/contrib/bash_compl/_rgbfix.bash +++ b/contrib/bash_compl/_rgbfix.bash @@ -101,7 +101,7 @@ _rgbfix_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 diff --git a/contrib/bash_compl/_rgbgfx.bash b/contrib/bash_compl/_rgbgfx.bash index f174c2c9..0a5b87ed 100755 --- a/contrib/bash_compl/_rgbgfx.bash +++ b/contrib/bash_compl/_rgbgfx.bash @@ -109,7 +109,7 @@ _rgbgfx_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 diff --git a/contrib/bash_compl/_rgblink.bash b/contrib/bash_compl/_rgblink.bash index b4f9e398..28eeb96b 100755 --- a/contrib/bash_compl/_rgblink.bash +++ b/contrib/bash_compl/_rgblink.bash @@ -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