about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2006-09-30 21:54:10 +0000
committerClint Adams <clint@users.sourceforge.net>2006-09-30 21:54:10 +0000
commit8855a7b635cadb5d75c7e1f6c78688dc569af14c (patch)
treec6f80cd71bfd3b8ffe3a0a5c146d1ceef18c1666
parent29af031d0df4c07a9ac986b92d113dac2d183753 (diff)
downloadzsh-8855a7b635cadb5d75c7e1f6c78688dc569af14c.tar.gz
zsh-8855a7b635cadb5d75c7e1f6c78688dc569af14c.tar.xz
zsh-8855a7b635cadb5d75c7e1f6c78688dc569af14c.zip
22799: change _fusermount to use _fuse_values and _canonical_paths.
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Linux/Command/_fusermount32
2 files changed, 20 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 9645c03d4..d52a0151b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2006-09-30  Clint Adams  <clint@zsh.org>
 
+	* 22799: R. Ramkumar: Completion/Linux/Command/_fusermount:
+	change _fusermount to use _fuse_values and _canonical_paths.
+
 	* 22798: R. Ramkumar: Completion/Unix/Command/_bittorrent:
 	cleanup and fixes.
 
diff --git a/Completion/Linux/Command/_fusermount b/Completion/Linux/Command/_fusermount
index 33aeccaa5..d3d1647fa 100644
--- a/Completion/Linux/Command/_fusermount
+++ b/Completion/Linux/Command/_fusermount
@@ -4,21 +4,23 @@ local expl context state line
 typeset -A opt_args
 
 _arguments \
-	'-h[help]' \
-	'-v[version]' \
-	'-o[options]:mount options:_values -s , "mount options" default_permissions allow_other allow_root kernel_cache large_read direct_io max_read=:size: hard_remove debug fsname=:name: use_ino readdir_ino nonempty umask=:umask: uid=:uid: gid=:gid:' \
-	'-u[unmount]' \
-	'-q[quiet]' \
-	'-z[lazy unmount]' \
-	':mountpoint:->mountpoint' && return 0
+  '-h[display help information]' \
+  '-V[display version information]' \
+  '-o[specify mount options]:mount options:_fuse_values "mount options"' \
+  '-u[unmount a fuse mount]' \
+  '-z[unmount lazily (work even when if the resource is still busy)]' \
+  '-q[suppress nonessential output]' \
+  ':mount point:->mountpoint' && return 0
+
+typeset -a mtpts
 
 case "$state" in
-	(mountpoint)
-	if [[ $+opt_args[-u] -eq 0 ]]; then
-	  _files -/
-        else
-	  _wanted mounted expl 'mounted filesystem' \
-	  compadd ${${${"${(f)$(< /etc/mtab)}"}#* }%% *}
-        fi
-	;;
+  (mountpoint)
+  if [[ $+opt_args[-u] -eq 0 ]]; then
+    _files -/
+  else
+    mtpts=(${${${"${(f)$(< /etc/mtab)}"}#* }%% *})
+    _canonical_paths mounted 'mounted filesystem' $mtpts
+  fi
+  ;;
 esac