From cd6fd2b0a3641774e7854ff8298d1d82643c4b4a Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Tue, 7 May 2019 23:24:49 +0200 Subject: 44274: allow finer control of completion match soring with compadd's -o option --- Completion/Zsh/Command/_compadd | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Completion/Zsh/Command') diff --git a/Completion/Zsh/Command/_compadd b/Completion/Zsh/Command/_compadd index e709e400e..781fa2af8 100644 --- a/Completion/Zsh/Command/_compadd +++ b/Completion/Zsh/Command/_compadd @@ -14,9 +14,13 @@ _arguments -C -s -S -A "-*" \ '(-a)-k[matches are keys of specified associative arrays]' \ '-d+[specify display strings]:array:_parameters -g "*array*"' \ '-l[list display strings one per line, not in columns]' \ - '-o[order matches by match string not by display string]' \ - '(-1 -E)-J+[specify match group which will be sorted]:group' \ - '-V+[specify pre-ordered match group]:group' \ + '-o[specify order for matches by match string not by display string]:: : _values -s , order + "match[order by match not by display string]" + "nosort[matches are pre-ordered]" + "numeric[order numerically]" + "reverse[order backwards]"' \ + '(-1 -E)-J+[specify match group]:group' \ + '!-V+:group' \ '(-J -E)-1[remove only consecutive duplicates from group]' \ '-2[preserve all duplicates]' \ '(-x)-X[specify explanation]:explanation' \ @@ -45,7 +49,7 @@ if [[ -n $state ]]; then elif (( $+opt_args[-k] )); then _parameters -g "*assoc*" && ret=0 else - _message -e candidate candidates + _message -e candidates candidate fi fi -- cgit 1.4.1