zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Sepp Steiner <steiner.sepp@gmx.net>
Cc: zsh-workers@sunsite.dk
Subject: Re: [PATCH] _net_interfaces: enable completion for mappings on debian systems
Date: Tue, 22 Jan 2008 10:53:49 +0100	[thread overview]
Message-ID: <7342.1200995629@thecus> (raw)
In-Reply-To: <fn3bjk$4o6$1@ger.gmane.org>

Sepp Steiner wrote:
> The main part of this patch enables completion of mappings for ifup on 
> debian systems and for ifdown the completion lists only interfaces that 
> are really up and running.

This looks useful. Limiting matches is always good. However, it doesn't
seem right to me that _net_interfaces, which completes network interfaces
in general, should have specific knowledge of ifup and ifdown - Debian
specific commands.

What would be good would be if _net_interfaces took an option to limit
that state of the interfaces it completes. You'd need to find a suitable
option letter that doesn't clash with a completion option (so -s for
state is out because it is used for suffixes). ifup and ifdown would
need their own completion function but it'd be as simple as something
like the following:

case $service in
  (ifup) _net_interfaces -n down;;
  (ifdown) _net_interfaces -n up;;
esac

This would also have the advantage that completion of network interfaces
elsewhere could then be limited to interfaces that are up or down.

Oliver


  reply	other threads:[~2008-01-22  9:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-21 23:58 Sepp Steiner
2008-01-22  9:53 ` Oliver Kiddle [this message]
2008-01-22 15:17   ` Bart Schaefer
2008-01-22 16:38   ` [ PATCH ] _net_interfaces: debian specific rewrite was: " Sepp Steiner

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=7342.1200995629@thecus \
    --to=okiddle@yahoo.co.uk \
    --cc=steiner.sepp@gmx.net \
    --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).