zsh-workers
 help / color / mirror / code / Atom feed
From: Sepp Steiner <steiner.sepp@gmx.net>
To: zsh-workers@sunsite.dk
Subject: [PATCH] _net_interfaces: enable completion for mappings on debian systems
Date: Tue, 22 Jan 2008 00:58:39 +0100	[thread overview]
Message-ID: <fn3bjk$4o6$1@ger.gmane.org> (raw)

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.

The first part of the patch avoids use of sed, when filling ${intf}.

The second part contains the patch to enable completion for mappings and
corrections of ifdown.

1. ifdown: If we call completion for ifdown look in
           /etc/network/run/ifstate and list the registered interfaces

2. ifup: My patch tries to dedect, if you use mappings. If you do use
         them, then my _net_interfaces completion lists all cominations
	 of interfaces and mappings, excluding the loopback interface.
	 In any other case it acts in the same way as the actual
	 completion.

   eg. - ifconfig -a lists eth0 and lo. Both of them are in
         /etc/network/interfaces -> Behavior as known
       - ifconfig -a lists eth0 and lo, but only one or none of them is
	 listed in /etc/network/interfaces and no other mapping is used
	 -> Behavior as known
       - ifconfig -a lists eth0 and lo. /etc/network/interfaces contains
	 one, none or both of them, but also other mappings ->
	 Completion lists all possible compinations of interfaces and
	 mappings excluding the loopback interface.

I tested this patch with zsh 4.3.4-dev-7 on debian unstable. 

Excuse me for only posting a link but i use gmane and slrn to poste this 
patch and it seems that slrn is not capable of attaching files.

http://members.inode.at/sepp.steiner/test/_net_interfaces.patch

Regards,
Sepp


             reply	other threads:[~2008-01-22  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-21 23:58 Sepp Steiner [this message]
2008-01-22  9:53 ` Oliver Kiddle
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='fn3bjk$4o6$1@ger.gmane.org' \
    --to=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).