zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@sunsite.dk
Subject: Re: [PATCH] _fuser Solaris and SVR4 support
Date: Mon, 21 Mar 2005 18:08:38 +0100	[thread overview]
Message-ID: <9029.1111424918@trentino.groupinfra.com> (raw)
In-Reply-To: <200503121046.54826.arvidjaar@newmail.ru>

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
 


  reply	other threads:[~2005-03-21 17:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-10 15:04 Andrey Borzenkov
2005-03-11  9:37 ` Oliver Kiddle
2005-03-12  7:46   ` Andrey Borzenkov
2005-03-21 17:08     ` Oliver Kiddle [this message]
2005-03-22 18:46       ` Andrey Borzenkov
2005-03-22 19:28         ` Oliver Kiddle
2005-03-11 10:47 ` Danek Duvall
2005-03-11 11:15   ` Oliver Kiddle
2005-03-12  7:53     ` Andrey Borzenkov
2005-03-12  7:55   ` Andrey Borzenkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9029.1111424918@trentino.groupinfra.com \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).