zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.dk
Subject: Re: PATCH: update-alternatives completion
Date: Tue, 29 May 2001 09:25:01 +0200 (MET DST)	[thread overview]
Message-ID: <200105290725.JAA08735@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: <20010528150509.A19581@dman.com>

Clint Adams wrote:

> The problem I alluded to in 14512 is present here.  If one
> tries to complete update-alternatives --remove,
> it tries to complete an "alt" argument in between
> --remove and the 1st argument.  Since the state is specified
> rather than possible completions for that argument, it
> doesn't seem very useful.

Here's the code:

> +    '--install:*::alt:->install' \
> +    '--remove:*::alt:->remove' \

The `:*::' removes everything up to the first argument after --remove
and --install.  Everything.  In particular: there's no `command word'
anymore and quite some time ago we decided that _arguments has to be
careful to complete only real arguments -- hence you don't get
completion for the first argument after these options.  Once there is an
argument, the calls to _arguments in the state-handling code are happy
to serve you because now they think that that first argument to the
option is the command word.

To solve this, we invented the `= ' prefix for _argument actions, i.e.:
just change the above to `...:= ->install' and so on.

> 
> Also, the slave substate doesn't work, but I haven't
> bothered to look into it yet.

By this description I don't know what you mean -- and without anything
debianish here I can't really try.  But anyway, you'd need some kind of
loop around the `case...esac' to enable these:

> +                   '--slave:*::slave:->islave' \

But of course you know that...

> ...
> 
> +                   '1:altname:_files -W /var/lib/dpkg/alternatives' \

Isn't there a better description than `altname'?  Or is this some well
known, recognised word in the debian world?


Bye
  Sven

P.S.: Too late now, but do you really like these mixed underscore/hyphen
      names?
P.P.S.: A command name with 19 characters?  What are we coming to... ;-)

-- 
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


  reply	other threads:[~2001-05-29  7:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-28 19:05 Clint Adams
2001-05-29  7:25 ` Sven Wischnowsky [this message]
2001-05-29  7:31   ` Andrej Borsenkow
2001-05-29 12:34     ` Clint Adams
2001-05-29 14:28       ` Andrej Borsenkow
2001-05-29 12:32   ` PATCH: " Clint Adams
2001-05-29 13:08     ` Sven Wischnowsky
2001-05-29 14:19       ` Clint Adams

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=200105290725.JAA08735@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --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).