Date: Fri, 29 May 2020 13:37:33 -0700 From: Chris <bsd-lists@BSDforge.com> To: "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net> Cc: Eugene Grosbein <eugen@grosbein.net>, Ian Lepore <ian@freebsd.org>, <freebsd-hackers@freebsd.org> Subject: Re: Introduce ifconfig -a -g groupname Message-ID: <ff150cc6566cb59d21ed15e03222672f@udns.ultimatedns.net> In-Reply-To: <202005291842.04TIgPJC099579@gndrsh.dnsmgr.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 29 May 2020 11:42:25 -0700 (PDT) Rodney W=2E Grimes freebsd-rwg@gndrs= h=2Ednsmgr=2Enet said > > On Fri, 2020-05-29 at 19:57 +0700, Eugene Grosbein wrote: > > > Hi! > > >=20 > > > Currently "ifconfig -a" command that shows status of network > > > interfaces > > > may be combined with flags -d or -u to limit the list to interfaces > > > that are down or up=2E > > >=20 > > > The change https://reviews=2Efreebsd=2Eorg/D25029 allows it to filter the > > > list > > > by name of interface group with additional flag -g groupname, or -g > > > ^groupname to negate condition > > > (this is different from "ifconfig -g groupname" that shows interface > > > names only > > > and that behaviour is not affected with the change)=2E > > >=20 > > > I chose caret symbol (^) was choosen to ease both scripted and > > > interactive usage > > > so it does not require extra quotation/escaping, but was told > > > that caret would require escaping in the zsh=2E > > >=20 > > > So I ask for suggestions which symbol to choose instead of caret=2E > > > Benedict Reuschling suggested @ and I'm fine with it > > > if we don't care about Perl code that would require escaping it when > > > running shell code=2E > > >=20 > > > For thouse who interested, these are supposed usage examples: > > >=20 > > > to exclude loopback from the list: > > > =09ifconfig -a -g ^lo > > > to show vlan interfaces only: > > > =09ifconfig -a -g vlan > > > to show tap interfaces that are up: > > > =09ifconfig -aug tap > > >=20 > >=20 > > An @ to express negation is insane=2E The only characters that have some > > precedent for meaning negation are ~ and !=2E >=20 > And perhaps the original ^, for me anyway=2E >=20 > > Escaping is a fact of life, asking people to remember crazy things like > > @ meaning not is far more onerous than occasionally needing to put > > quotes or escapes on something=2E >=20 > Agree with that fully=2E >=20 > I actually do not like special tokens in arguments to options, > and prefer the suggested use of a different option for exclude, > as in -G vlan to exclude gruop vlan=2E >=20 > I can not think of a command of the top of my head that does > exclusion by special token in option argument and can think > of many with --include --exclude type options=2E FWIW I'd like to add a +100% on this=2E It just somehow seems an awful lot more intuitive=2E --Chris >=20 > > -- Ian > --=20 > Rod Grimes =20 > rgrimes@freebsd=2Eorg > _______________________________________________ > freebsd-hackers@freebsd=2Eorg mailing list > https://lists=2Efreebsd=2Eorg/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd=2Eorg= "
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ff150cc6566cb59d21ed15e03222672f>