about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Completion/Unix/Type/_umountable3
-rw-r--r--Src/Zle/complete.c4
3 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index cfc1a2841..a933a5186 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2023-10-10  Oliver Kiddle  <opk@zsh.org>
 
+	* 52189: Completion/Unix/Type/_umountable, Src/Zle/complete.c:
+	ignore compadd -M if -U also specified as they don't make
+	sense together, this fixes df completion
+
 	* 52217: Completion/BSD/Command/_freebsd-update,
 	Completion/BSD/Command/_ipfw, Completion/BSD/Command/_pfctl,
 	Completion/BSD/Command/_sockstat, Completion/Unix/Command/_cmp,
diff --git a/Completion/Unix/Type/_umountable b/Completion/Unix/Type/_umountable
index 6e4988e2d..0111555b6 100644
--- a/Completion/Unix/Type/_umountable
+++ b/Completion/Unix/Type/_umountable
@@ -1,6 +1,6 @@
 #autoload
 local tmp
-local dev_tmp dpath_tmp mp_tmp mline
+local -a dev_tmp dpath_tmp mp_tmp mline
 
 case "$OSTYPE" in
 linux*)
@@ -15,6 +15,7 @@ irix*)
   ;;
 freebsd*|dragonfly*)
   /sbin/mount | while read mline; do
+    [[ $mline[(w)1] = map ]] && continue
     dev_tmp+=( $mline[(w)1] )
     mp_tmp+=( $mline[(w)3] )
   done
diff --git a/Src/Zle/complete.c b/Src/Zle/complete.c
index 96ad7b3f1..342611f1f 100644
--- a/Src/Zle/complete.c
+++ b/Src/Zle/complete.c
@@ -829,7 +829,9 @@ bin_compadd(char *name, char **argv, UNUSED(Options ops), UNUSED(int func))
 
  ca_args:
 
-    if (mstr && (match = parse_cmatcher(name, mstr)) == pcm_err) {
+    if (mstr && (dat.aflags & CAF_MATCH) &&
+	    (match = parse_cmatcher(name, mstr)) == pcm_err)
+    {
 	zsfree(mstr);
 	zfree(dat.dpar, dparsize);
 	return 1;