test-complete (ripgrep-12.1.1) | : | test-complete (ripgrep-13.0.0) | ||
---|---|---|---|---|
skipping to change at line 47 | skipping to change at line 47 | |||
} | } | |||
print -rl - 'Comparing options:' "-$rg" "+$_rg" | print -rl - 'Comparing options:' "-$rg" "+$_rg" | |||
# 'Parse' options out of the `--help` output. To prevent false positives we | # 'Parse' options out of the `--help` output. To prevent false positives we | |||
# only look at lines where the first non-white-space character is `-`, or | # only look at lines where the first non-white-space character is `-`, or | |||
# where a long option starting with certain letters (see `_rg`) is found. | # where a long option starting with certain letters (see `_rg`) is found. | |||
# Occasionally we may have to handle some manually, however | # Occasionally we may have to handle some manually, however | |||
help_args=( ${(f)"$( | help_args=( ${(f)"$( | |||
$rg --help | | $rg --help | | |||
$rg -i -- '^\s+--?[a-z0-9]|--[a-z]' | | $rg -i -- '^\s+--?[a-z0-9.]|--[a-z]' | | |||
$rg -ior '$1' -- $'[\t /\"\'`.,](-[a-z0-9]|--[a-z0-9-]+)\\b' | | $rg -ior '$1' -- $'[\t /\"\'`.,](-[a-z0-9.]|--[a-z0-9-]+)(,|\\b)' | | |||
$rg -v -- --print0 | # False positives | $rg -v -- --print0 | # False positives | |||
sort -u | sort -u | |||
)"} ) | )"} ) | |||
# 'Parse' options out of the completion function | # 'Parse' options out of the completion function | |||
comp_args=( ${(f)"$( get_comp_args $_rg )"} ) | comp_args=( ${(f)"$( get_comp_args $_rg )"} ) | |||
# Note that we currently exclude hidden (!...) options; matching these | # Note that we currently exclude hidden (!...) options; matching these | |||
# properly against the `--help` output could be irritating | # properly against the `--help` output could be irritating | |||
comp_args=( ${comp_args#\(*\)} ) # Strip excluded options | comp_args=( ${comp_args#\(*\)} ) # Strip excluded options | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |