From owner-freebsd-hackers@freebsd.org Fri May 29 17:39:15 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 E2F6533DBA5 for ; Fri, 29 May 2020 17:39:15 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2k.ore.mailhop.org (outbound2k.ore.mailhop.org [54.148.219.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49YWyq3FWsz46wP for ; Fri, 29 May 2020 17:39:15 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1590773953; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=nZ4J28g071wV3fySPRbusHBkvQG7VD5KXuPB35znEtzOcMi/BWR6mxtRUSyI7UZ4sg0/0/4faMeCh 20jpuzS9qYA+26xrmZxBbfT6l8bePBCoQhV8eL9Ty2p758gl0degA6iVuhzZLRldpIbol9hqT0/Uex TxX1r4XQWXCRgqZtuCLAh9VGppNclounVZ2UtglmX5Z8qLU50YaYqW1G0qQ7NHxcNQa6cHO877MP9R HiwgkNgG9YBn7JySo2PbJ0BL1AVQQ2uC1JGSqOUnAW7JpEvlCFvr5UClJXC5EEXpYlRrZzjbgioQCJ 8jIC/J4RpjTs8YlhG8UwA5kjQHipKVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=05JXMmekUGCLBU4zvWJEQEvo1PC42xVlBENHMD674jY=; b=b4sTU4YC1YX7QT0Rb0WyZY4rHVRpjKzdLVcJle0jqOZJYzmmvfC8oMJo9I2Vhr0bWE7arF1QtkeCU M+PWJuZIpk78UCkGJzQDvLc5iIxndSKvEPCLR5rBNVmin54hjVQAKEbrl4wsyHkIGE7ozjVFTAAn/g +Sxoay6TJ37AT9mifQJqZw/6cyz6DJBh/RYZq6BXJP9q3IFIQevQk9M6xbSM36rb4xpKNydAucOXbo QkLcHE87mvfh0EGMoJGRA7X5l10EM8x84/FaV97ZLnsD78/2yBJAdbxoi5MWxYjARpRgkDN0dAvI5I D2axM9uzwKA2M3REy3tyclVNgbDqoCA== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=05JXMmekUGCLBU4zvWJEQEvo1PC42xVlBENHMD674jY=; b=BXd2rmDsxvqV9o6EtNV3MSnpkSqAu1oZhpa7RMjpqv4zsw0nWQLRzK8cDDT2ATS3IL/RJW0wsQBwk aW88Rr4jAEFlMd/ym7B2VTGf4knVJelKl0OUJsHy0FPDFqg+QlQS4c4i+Uqop+/4cIUF2DBfDDYejU y6sUKQryY5DWuoOKreO1QwlTO6SbLHIUO76j8Kg1tl55t8N37yYLnbcQ3M8LELUvUvNmUyR6jf8sNf loovuRjch5o3NFJedw9NJ3QSKxNwvA+RO6Ebw18RvtzUQpuBLQw5GkC4dcydtupzWSvvLrvJJLCUrI wZAxOWYD60a28uInCHjZ+LI/Fx67vGg== X-MHO-RoutePath: aGlwcGll X-MHO-User: 4d0998e5-a1d3-11ea-a067-6d02e42e573a X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 4d0998e5-a1d3-11ea-a067-6d02e42e573a; Fri, 29 May 2020 17:39:12 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 04THd8iV049452; Fri, 29 May 2020 11:39:08 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1bb658e41c849e9ea2c623ffdc70b0b934d4053d.camel@freebsd.org> Subject: Re: Introduce ifconfig -a -g groupname From: Ian Lepore To: Eugene Grosbein , Freebsd hackers list Date: Fri, 29 May 2020 11:39:08 -0600 In-Reply-To: References: Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49YWyq3FWsz46wP X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] 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 17:39:15 -0000 On Fri, 2020-05-29 at 19:57 +0700, Eugene Grosbein wrote: > Hi! > > 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. > > The change https://reviews.freebsd.org/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). > > 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. > > So I ask for suggestions which symbol to choose instead of caret. > 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. > > For thouse who interested, these are supposed usage examples: > > to exclude loopback from the list: > ifconfig -a -g ^lo > to show vlan interfaces only: > ifconfig -a -g vlan > to show tap interfaces that are up: > ifconfig -aug tap > An @ to express negation is insane. The only characters that have some precedent for meaning negation are ~ and !. 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. -- Ian