From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3292 invoked from network); 11 Mar 2005 09:37:58 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 11 Mar 2005 09:37:58 -0000 Received: (qmail 56068 invoked from network); 11 Mar 2005 09:37:53 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Mar 2005 09:37:53 -0000 Received: (qmail 14122 invoked by alias); 11 Mar 2005 09:37:50 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20964 Received: (qmail 14108 invoked from network); 11 Mar 2005 09:37:49 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 11 Mar 2005 09:37:49 -0000 Received: (qmail 55790 invoked from network); 11 Mar 2005 09:37:46 -0000 Received: from mail36.messagelabs.com (193.109.254.211) by a.mx.sunsite.dk with SMTP; 11 Mar 2005 09:37:38 -0000 X-VirusChecked: Checked X-Env-Sender: okiddle@yahoo.co.uk X-Msg-Ref: server-7.tower-36.messagelabs.com!1110533863!14818245!1 X-StarScan-Version: 5.4.11; banners=-,-,- X-Originating-IP: [158.234.9.163] Received: (qmail 32270 invoked from network); 11 Mar 2005 09:37:43 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-7.tower-36.messagelabs.com with SMTP; 11 Mar 2005 09:37:43 -0000 Received: from trentino.logica.co.uk ([158.234.142.59]) by iris.logica.co.uk (8.12.3/8.12.3/Debian -4) with ESMTP id j2B9ba61025713 for ; Fri, 11 Mar 2005 09:37:36 GMT Received: from trentino.groupinfra.com (localhost [127.0.0.1]) by trentino.logica.co.uk (Postfix) with ESMTP id 840B1364EB for ; Fri, 11 Mar 2005 10:37:16 +0100 (CET) X-VirusChecked: Checked X-StarScan-Version: 5.0.7; banners=.,-,- In-reply-to: From: Oliver Kiddle References: To: zsh-workers@sunsite.dk Subject: Re: [PATCH] _fuser Solaris and SVR4 support Date: Fri, 11 Mar 2005 10:37:16 +0100 Message-ID: <24297.1110533836@trentino.groupinfra.com> X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 Andrey wrote: > I have access to Solaris 9 only so please extend this with > other versions (BTW Solaris 10 is now 5.10 not 2.10). Solaris 8 only has the basic set of options so no changes are needed for it and, presumably, earlier versions. > Completion for SVR4 is not quite right - it should complete > signal names only after -k, but it seems to be too much work. It isn't too hard and it is always very annoying to break file completion (as this does for Solaris). Does this patch do the right thing? Oliver Index: _fuser =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_fuser,v retrieving revision 1.2 diff -u -r1.2 _fuser --- _fuser 10 Mar 2005 18:38:16 -0000 1.2 +++ _fuser 11 Mar 2005 09:31:04 -0000 @@ -1,6 +1,6 @@ #compdef fuser -local -a args arg1 +local -a args kopt if _pick_variant -c $words[1] gnu=GNU unix -V; then _arguments \ @@ -19,6 +19,7 @@ '-6[search only for IPv6 sockets]' \ ':name:_files' else + kopt='-k[kill processes accessing the file]' case $OSTYPE in solaris2.9 ) args=( @@ -27,16 +28,15 @@ ) ;; sysv4 ) - arg1=( ':signal:_signals -p' ) + kopt+=':signal:_signals -p' ;; esac _arguments \ '(-f)-c[list all processes accessing files on the filesystem specified by name]' \ '(-c)-f[list all processes accessing named files]' \ - '-k[kill processes accessing the file]' \ '-u[append the user name of the process owner to each PID]' \ + $kopt \ $args \ - $arg1 \ ':name:_files' fi