Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] _fuser Solaris and SVR4 support
- X-seq: zsh-workers 21043
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: [PATCH] _fuser Solaris and SVR4 support
- Date: Mon, 21 Mar 2005 18:08:38 +0100
- In-reply-to: <200503121046.54826.arvidjaar@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <E1D9PCy-000Gis-00.arvidjaar-mail-ru@xxxxxxxxxx> <24297.1110533836@xxxxxxxxxxxxxxxxxxxxxxx> <200503121046.54826.arvidjaar@xxxxxxxxxx>
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]
Does the new patch below now do the right thing?
> Will "prerequisite options" be generally useful? I.e. something like
>
> [-a]-b:....
They would. But changing _arguments isn't exactly easy. An alternative
syntax might be something like (!-a), mixing them with the exclusion
lists.
Oliver
Index: Completion/Unix/Command/_fuser
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_fuser,v
retrieving revision 1.2
diff -u -r1.2 _fuser
--- Completion/Unix/Command/_fuser 10 Mar 2005 18:38:16 -0000 1.2
+++ Completion/Unix/Command/_fuser 21 Mar 2005 17:02:20 -0000
@@ -27,7 +27,7 @@
)
;;
sysv4 )
- arg1=( ':signal:_signals -p' )
+ (( $+words[(r)-k] )) && arg1=( ':signal:_signals -p' )
;;
esac
Messages sorted by:
Reverse Date,
Date,
Thread,
Author