From owner-freebsd-hackers@freebsd.org Fri May 29 20:37:19 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 03C2E2F0D95 for ; Fri, 29 May 2020 20:37:19 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (static-24-113-41-81.wavecable.com [24.113.41.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ultimatedns.net", Issuer "Let's Encrypt Authority X3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49YbwF4pV6z4NDN; Fri, 29 May 2020 20:37:16 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by udns.ultimatedns.net (8.15.2/8.15.2) with ESMTPS id 04TKbRlU075428 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Fri, 29 May 2020 13:37:34 -0700 (PDT) (envelope-from bsd-lists@BSDforge.com) X-Mailer: Cypht MIME-Version: 1.0 Cc: Eugene Grosbein , Ian Lepore , In-Reply-To: <202005291842.04TIgPJC099579@gndrsh.dnsmgr.net> From: Chris Reply-To: bsd-lists@BSDforge.com To: "Rodney W. Grimes" Subject: Re: Introduce ifconfig -a -g groupname Date: Fri, 29 May 2020 13:37:33 -0700 Message-Id: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 49YbwF4pV6z4NDN X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:11404, ipnet:24.113.0.0/16, country:US]; local_wl_ip(0.00)[24.113.41.81] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 20:37:19 -0000 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= "