From 632fee7cdfcd234a5c7c53f17777ca18e62d82e3 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Sat, 30 Oct 2021 23:27:29 +0200 Subject: 49528: allow multiple -D options to compadd --- Completion/X/Command/_xinput | 3 +-- Completion/Zsh/Command/_compadd | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'Completion') diff --git a/Completion/X/Command/_xinput b/Completion/X/Command/_xinput index 00a976d5d..2bbadd65a 100644 --- a/Completion/X/Command/_xinput +++ b/Completion/X/Command/_xinput @@ -106,8 +106,7 @@ case $state in if [[ $PREFIX$SUFFIX = [^-]*[^0-9]* ]]; then # match based on the names but insert IDs - compadd "$expl[@]" -M 'b:=* m:{[:lower:]}={[:upper:]}' -D ids -a names - compadd "$expl[@]" -M 'b:=* m:{[:lower:]}={[:upper:]}' -D disp -a names + compadd "$expl[@]" -M 'b:=* m:{[:lower:]}={[:upper:]}' -D ids -D disp -a names compadd "$expl[@]" -U -ld disp -a ids && ret=0 zstyle -s ":completion:${curcontext}:input-devices" insert-ids out || out=menu diff --git a/Completion/Zsh/Command/_compadd b/Completion/Zsh/Command/_compadd index 9c92cda76..4456cf71e 100644 --- a/Completion/Zsh/Command/_compadd +++ b/Completion/Zsh/Command/_compadd @@ -31,7 +31,7 @@ args=( '-n[hide matches in completion listing]' '-O+[populate array with matches instead of adding them]:array:_parameters -g "*array*"' '-A+[populate array with expanded matches instead of adding them]:array:_parameters -g "*array*"' - '-D+[delete elements from array corresponding to non-matching candidates]:array:_parameters -g "*array*"' + '*-D+[delete elements from array corresponding to non-matching candidates]:array:_parameters -g "*array*"' ) case $service in -- cgit 1.4.1