From e6d2f7ba01b9f9af36c873a5066eaf655f37d02b Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Tue, 16 Dec 2003 16:25:39 +0000 Subject: 19299: try to handle completion of devices better --- Completion/Unix/Command/_mount | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Completion') diff --git a/Completion/Unix/Command/_mount b/Completion/Unix/Command/_mount index 691bfa7bb..bcb59dd6c 100644 --- a/Completion/Unix/Command/_mount +++ b/Completion/Unix/Command/_mount @@ -785,9 +785,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 ;; -- cgit 1.4.1