From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6427 invoked from network); 30 Sep 2006 21:52:44 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.5 (2006-08-29) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 30 Sep 2006 21:52:44 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 96453 invoked from network); 30 Sep 2006 21:52:38 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 30 Sep 2006 21:52:37 -0000 Received: (qmail 1716 invoked by alias); 30 Sep 2006 21:52:36 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22799 Received: (qmail 1707 invoked from network); 30 Sep 2006 21:52:35 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 30 Sep 2006 21:52:35 -0000 Received: (qmail 96178 invoked from network); 30 Sep 2006 21:52:35 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 30 Sep 2006 21:52:34 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id 1FCA470055; Sat, 30 Sep 2006 17:52:34 -0400 (EDT) Date: Sat, 30 Sep 2006 17:52:34 -0400 From: Clint Adams To: zsh-workers@sunsite.dk Subject: PATCH: _fusermount Message-ID: <20060930215233.GA25123@scowler.net> Mail-Followup-To: zsh-workers@sunsite.dk MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) Modifications to _fusermount to use 22797, from R. Ramkumar. Index: Completion/Linux/Command/_fusermount =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Linux/Command/_fusermount,v retrieving revision 1.1 diff -u -r1.1 _fusermount --- Completion/Linux/Command/_fusermount 7 Dec 2005 19:58:41 -0000 1.1 +++ Completion/Linux/Command/_fusermount 30 Sep 2006 21:51:30 -0000 @@ -4,21 +4,23 @@ 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