about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2021-10-30 23:27:29 +0200
committerOliver Kiddle <opk@zsh.org>2021-10-30 23:35:04 +0200
commit632fee7cdfcd234a5c7c53f17777ca18e62d82e3 (patch)
treefca80472477f8a5a3ba75ab23e273d418decebb0 /Completion
parent0b6e73d47736228a53e941d703ed902c4b915b3a (diff)
downloadzsh-632fee7cdfcd234a5c7c53f17777ca18e62d82e3.tar.gz
zsh-632fee7cdfcd234a5c7c53f17777ca18e62d82e3.tar.xz
zsh-632fee7cdfcd234a5c7c53f17777ca18e62d82e3.zip
49528: allow multiple -D options to compadd
Diffstat (limited to 'Completion')
-rw-r--r--Completion/X/Command/_xinput3
-rw-r--r--Completion/Zsh/Command/_compadd2
2 files changed, 2 insertions, 3 deletions
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