Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug#607603: zsh: Completion of fuser command does not detect psmisc version



On Mon, Dec 20, 2010 at 12:04:44AM -0500, gi1242+debianbugs@xxxxxxxxx wrote:
> The completion function for fuser tries to determine if fuser is
> provided by PSmisc, or other the (less functional) generic Unix version.
> It decides by checking the output of "fuser -V" for psmisc. However it
> does not use case insensitive matching, so the test fails on my system
> (even though my fuser is provided by psmisc).
> 
> Changing line 6 in
> 
>     /usr/share/zsh/functions/Completion/Unix/_fuser
> 
> from
> 
>     if _pick_variant -c $words[1] psmisc=psmisc unix -V; then
> 
> to
> 
>     if _pick_variant -c $words[1] psmisc='(#i)psmisc' unix -V; then
> 
> fixes the problem.


Thanks.

Index: Completion/Unix/Command/_fuser
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_fuser,v
retrieving revision 1.4
diff -u -r1.4 _fuser
--- Completion/Unix/Command/_fuser	1 Apr 2005 19:49:40 -0000	1.4
+++ Completion/Unix/Command/_fuser	25 Dec 2010 15:16:51 -0000
@@ -3,7 +3,7 @@
 local -a args arg1
 typeset -A opt_args
 
-if _pick_variant -c $words[1] psmisc=psmisc unix -V; then
+if _pick_variant -c $words[1] psmisc='#(i)psmisc' unix -V; then
 
   (( $+functions[_fuser_services] )) ||
   _fuser_services() {



Messages sorted by: Reverse Date, Date, Thread, Author