about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2003-12-16 16:23:08 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-12-16 16:23:08 +0000
commitf8c004aa611908c9134a2174971ba80f9f8a0403 (patch)
treed70531fdcee553e05fbb2ef26cfaa8dd6b4a57a8
parent6eb5f99f1e71e8ea89057c2843f3e8273a0d2fdd (diff)
downloadzsh-f8c004aa611908c9134a2174971ba80f9f8a0403.tar.gz
zsh-f8c004aa611908c9134a2174971ba80f9f8a0403.tar.xz
zsh-f8c004aa611908c9134a2174971ba80f9f8a0403.zip
19299: try to handle completion of devices better
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_mount8
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 86ac8a48d..9047b8151 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-12-16  Oliver Kiddle  <opk@zsh.org>
+
+	* 19299: Completion/Unix/Command/_mount: try to handle
+	completion of devices better
+
 2003-12-15  Peter Stephenson  <pws@csr.com>
 
 	* unposted: Doc/Zsh/zle.yo: add an extra comment to
diff --git a/Completion/Unix/Command/_mount b/Completion/Unix/Command/_mount
index 7c001844d..17bce8023 100644
--- a/Completion/Unix/Command/_mount
+++ b/Completion/Unix/Command/_mount
@@ -771,9 +771,11 @@ devordir)
       'directories:mount point:compadd -a mp_tmp' && ret=0
     ;;
   *)
-    _alternative \
-      'devices:device:_files -P /dev/ -W /dev' \
-      'directories:mount point:_directories' && ret=0
+    if (( ${${(s.,.)opt_args[-o]}[(I)loop(|=*)]} )) ; then
+      _wanted device-files expl 'loop device file' _files && ret=0
+    else
+      _wanted files expl 'device or mount point' _files -g "*(-%,-/)" && ret=0
+    fi
     ;;
   esac
   ;;