Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] _fuser Solaris and SVR4 support
- X-seq: zsh-workers 21051
- From: Andrey Borzenkov <arvidjaar@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: [PATCH] _fuser Solaris and SVR4 support
- Date: Tue, 22 Mar 2005 21:46:11 +0300
- In-reply-to: <9029.1111424918@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <E1D9PCy-000Gis-00.arvidjaar-mail-ru@xxxxxxxxxx> <200503121046.54826.arvidjaar@xxxxxxxxxx> <9029.1111424918@xxxxxxxxxxxxxxxxxxxxxxx>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday 21 March 2005 20:08, Oliver Kiddle wrote:
> On 12 Mar, Andrey wrote:
> > I actually meant - signal names should be completed only if -k is present
> > (because they are meaningless without). But currently it is possible to
> > implement only using ->state and it seemed too much work for such small
> > function.
>
> Normally we implement that by just checking for $+words[(r)-k]
Oops.
> Does the new patch below now do the right thing?
>
well, except at it turned out it was impossible to complete file name as first
argument; also fuser takes more than one file.
Is the following the right way to do it?
- -andrey
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_fuser,v
retrieving revision 1.2
diff -u -p -r1.2 _fuser
- --- Completion/Unix/Command/_fuser 10 Mar 2005 18:38:16 -0000 1.2
+++ Completion/Unix/Command/_fuser 22 Mar 2005 13:16:45 -0000
@@ -27,7 +27,7 @@ else
)
;;
sysv4 )
- - arg1=( ':signal:_signals -p' )
+ (( $+words[(r)-k] )) && arg1=( ':signal: _alternative
signals\:signals\:_signals\ -p files:files:_files' )
;;
esac
@@ -38,5 +38,5 @@ else
'-u[append the user name of the process owner to each PID]' \
$args \
$arg1 \
- - ':name:_files'
+ '*:name:_files'
fi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCQGf0R6LMutpd94wRAmukAKC2NGrLVjGxAs/ezs8D8Fk+UD0fvACdHbFt
8IuJko+PJDQ0EhYXqmKyhqo=
=bH6f
-----END PGP SIGNATURE-----
Messages sorted by:
Reverse Date,
Date,
Thread,
Author