Date: Thu, 11 Jun 2020 19:28:00 +0200 From: Steffen Nurpmeso <steffen@sdaoden.eu> To: Ian Lepore <ian@freebsd.org> Cc: Mateusz Piotrowski <0mp@FreeBSD.org>, Yuri Pankov <yuripv@yuripv.dev>, 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: <de4e33af55f1fba6672b0c3f866e33853849eb0e.camel@freebsd.org> References: <202006101923.05AJNwPt006602@repo.freebsd.org> <a5e45631-bf32-56bc-4c03-0d0ad1d10ff2@yuripv.dev> <20200610220619.Iup5c%steffen@sdaoden.eu> <995726df-cb28-c294-09ca-6cca302b24a6@FreeBSD.org> <20200611142908.z3_Ao%steffen@sdaoden.eu> <de4e33af55f1fba6672b0c3f866e33853849eb0e.camel@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hey. Ian Lepore wrote in <de4e33af55f1fba6672b0c3f866e33853849eb0e.camel@freebsd.org>: |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 |>|> <a5e45631-bf32-56bc-4c03-0d0ad1d10ff2@yuripv.dev>: |>|>|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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200611172800.EnzGX%steffen>