zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] _net_interfaces: enable completion for mappings on debian systems
@ 2008-01-21 23:58 Sepp Steiner
  2008-01-22  9:53 ` Oliver Kiddle
  0 siblings, 1 reply; 4+ messages in thread
From: Sepp Steiner @ 2008-01-21 23:58 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-01-22 16:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-21 23:58 [PATCH] _net_interfaces: enable completion for mappings on debian systems Sepp Steiner
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

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).