Standard completion of current option by Roy-Orbison · Pull Request #5873 · wp-cli/wp-cli
@swissspidy What tests would you need for this change? You can verify it with the following commands:
(COMP_LINE='wp search-replace --report'; wp cli completions --line="$COMP_LINE" --point=${#COMP_LINE})
produces
--report
--report-changed-only
preserving the current word. Repeating the word, e.g.
(COMP_LINE='wp search-replace --report --report'; wp cli completions --line="$COMP_LINE" --point=${#COMP_LINE})
produces only
which demonstrates that this change preserves the existing "don't complete options that have already been typed" behaviour. The $assoc_args could be named bit better if this is its only purpose.