From owner-svn-src-head@freebsd.org Thu Jun 11 17:36:21 2020 Return-Path: Delivered-To: svn-src-head@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 6F22E33B12A; Thu, 11 Jun 2020 17:36:21 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (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 49jWHS60RGz46ss; Thu, 11 Jun 2020 17:36:20 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: by sdaoden.eu (Postfix, from userid 1000) id 504AD16054; Thu, 11 Jun 2020 19:28:00 +0200 (CEST) Date: Thu, 11 Jun 2020 19:28:00 +0200 From: Steffen Nurpmeso To: Ian Lepore Cc: Mateusz Piotrowski <0mp@FreeBSD.org>, Yuri Pankov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362017 - in head/usr.bin/sed: . tests Message-ID: <20200611172800.EnzGX%steffen@sdaoden.eu> In-Reply-To: References: <202006101923.05AJNwPt006602@repo.freebsd.org> <20200610220619.Iup5c%steffen@sdaoden.eu> <995726df-cb28-c294-09ca-6cca302b24a6@FreeBSD.org> <20200611142908.z3_Ao%steffen@sdaoden.eu> Mail-Followup-To: Ian Lepore , Mateusz Piotrowski <0mp@FreeBSD.org>, Yuri Pankov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org User-Agent: s-nail v14.9.19-56-g9975bde7 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. X-Rspamd-Queue-Id: 49jWHS60RGz46ss X-Spamd-Bar: +++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of steffen@sdaoden.eu designates 217.144.132.164 as permitted sender) smtp.mailfrom=steffen@sdaoden.eu X-Spamd-Result: default: False [5.61 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+a:c]; NEURAL_SPAM_SHORT(0.54)[0.544]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sdaoden.eu]; SEM_URIBL_FRESH15(3.00)[yuripv.dev:email]; RCPT_COUNT_FIVE(0.00)[6]; BAD_REP_POLICIES(0.10)[]; NEURAL_SPAM_MEDIUM(0.36)[0.359]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.71)[0.706]; MID_CONTAINS_FROM(1.00)[]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15987, ipnet:217.144.128.0/20, country:DE]; GREYLIST(0.00)[pass,body] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2020 17:36:21 -0000 Hey. Ian Lepore wrote in : |On Thu, 2020-06-11 at 16:29 +0200, Steffen Nurpmeso wrote: |> Hello. |> |> Mateusz Piotrowski wrote in |> <995726df-cb28-c294-09ca-6cca302b24a6@FreeBSD.org>: |>|On 6/11/20 12:06 AM, Steffen Nurpmeso wrote: |>|> Yuri Pankov wrote in |>|> : |>|>|Mateusz Piotrowski wrote: |>|>|> Author: 0mp (doc,ports committer) |>|>|> Date: Wed Jun 10 19:23:58 2020 |>|>|> New Revision: 362017 |>|>|> URL: https://svnweb.freebsd.org/changeset/base/362017 |>|>|> |>|>|> Log: |>|>|> Read commands from stdin when -f - is passed to sed(1) |>|> .. |>|>|Am I reading it wrong, or is it the same test case added 3 times? |>|> |>|> It also used "Fl f Cm -" instead of "Fl f Ar -". Just saying.. |> |>|Which is correct. "-" is not a variable here. It is a fixed string hence |>|the use of Cm. |> |> I would rather say no, .Ar is an argument (to the ".Fl"ag f), |> whereas .Cm is a command modifier: |> |> Command Modifiers |> The command modifier is identical to the '.Fl' (flag) command \ |> with the |> exception that the '.Cm' macro does not assert a dash in front \ |> of every |> argument. Traditionally flags are marked by the preceding dash, \ |> however, |> some commands or subsets of commands do not use them. Command \ |> modifiers |> may also be specified in conjunction with interactive commands \ |> such as |> editor commands. |> | |Yeah, but... | | The '.Fl' macro without any arguments results in a dash representing | stdin/stdout. Note that giving '.Fl' a single dash will result in | two dashes. The '.Fl' macro is parsed and is callable. | |And that seems to argue that "Fl f Fl" is correct. This will not result in a well-formed XML document. I seem to have lost track now. He wanted to document the typical "is standard input" argument to the command line option (flag) -f, didn't he? If so then "Fl f Ar -" should be the correct way of documenting this. Of course - "modifies the command" ("is a command modifier"), heh. You could also say "Fl f Pa -" if you go that route, because the argument should be a path, yet it is not in this very special case, which denotes standard input. But i would use "Fl f Ar -". --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)