From: Aaron <aaronscohen@gmail.com>
To: Larry McVoy <lm@mcvoy.com>, tuhs@tuhs.org
Subject: [TUHS] Re: Of flags and keyletters
Date: Sun, 3 Mar 2024 14:28:48 -0500 [thread overview]
Message-ID: <C7C07444-7344-4DDF-B146-7392FD30631A@gmail.com> (raw)
In-Reply-To: <20240303175253.GQ5304@mcvoy.com>
Unix has long benefited from the notion that everything can be improved!
Sent from my iPhone
> On Mar 3, 2024, at 12:53 PM, Larry McVoy <lm@mcvoy.com> wrote:
>
> I rewrote getopt() for BitKeeper because I wanted long options and
> wanted to allow optional args but also have required args.
>
>> On Sun, Mar 03, 2024 at 12:38:20PM -0500, Aaron wrote:
>> Having written the first versions of getopt(3), getopt(1), and associated man pages around 1979, I do not recall any real orthodoxy in the use of ???options??? vs ???flags.??? In general, ???flags??? seemed to be reserved for single arguments in the form of ???-x???
>>
>> I wrote getopt, and rewrote many commands to use it because I got annoyed at trying to remember which commands required ???-x -y -z??? vs ???-xyz???, and which flags required or allowed optional arguments.
>>
>> Aaron
>>
>>
>>
>>>> On Mar 2, 2024, at 5:22???PM, jnc@mercury.lcs.mit.edu wrote:
>>>
>>> ???
>>>>
>>>> From: Bakul Shah
>>>
>>>> Use of "flag" for this purpose seems strange. "option" makes more sense.
>>>
>>> People on this list seem to forget that there were computers before UNIX.
>>>
>>> The _syntax_ of "-f" probably predates any UNIX; Multics used it extensively.
>>> See the "Introduction to Multics", MAC-TR-123, January 1974 (a little after
>>> UNIX V1, but I expect I could probably track it back further in time, if I
>>> cared to put in the effort); pg. 3-24.
>>>
>>> Interestingly, I looked though the CTSS manual, and CTSS did not seem to use
>>> this syntax for flag arguments: see, e.g., the SAVE command (section AH.3.03).
>>>
>>>
>>> The _name_ "flag" came in early on UNIX. (Multics called them "arguments";
>>> see above, pg. 3-27, top line.) We can see this happen - see:
>>>
>>> http://squoze.net/UNIX/v1man/man1/du
>>>
>>> which calls the "-a" and "-s" "arguments"; but in:
>>>
>>> http://squoze.net/UNIX/v1man/man1/ld
>>>
>>> "-s", "-u", etc are called "flag arguments".
>>>
>>> Long enough ago that certainty about the etymology/rationale is probably now
>>> lost.
>>>
>>> Noel
>
> --
> ---
> Larry McVoy Retired to fishing http://www.mcvoy.com/lm/boat
next prev parent reply other threads:[~2024-03-03 19:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-02 22:14 Noel Chiappa
2024-03-03 17:38 ` Aaron
2024-03-03 17:52 ` Larry McVoy
2024-03-03 19:28 ` Aaron [this message]
2024-03-03 18:44 ` [TUHS] Re: getopt Phil Budne
2024-03-03 21:24 ` [TUHS] Re: Of flags and keyletters Rich Salz
-- strict thread matches above, loose matches on Subject: below --
2024-03-01 15:49 [TUHS] " Douglas McIlroy
2024-03-01 16:23 ` [TUHS] " Steve Nickolas
2024-03-01 19:44 ` Paul Winalski
2024-03-01 16:56 ` Bakul Shah via TUHS
2024-03-02 0:33 ` silas poulson via TUHS
2024-03-02 18:53 ` Lars Brinkhoff
2024-03-02 18:24 ` Paul Winalski
2024-03-02 18:35 ` Warner Losh
2024-02-29 17:21 [TUHS] " Dave Horsfall
2024-02-29 17:59 ` [TUHS] " segaloco via TUHS
2024-03-01 5:30 ` Dave Horsfall
2024-03-01 5:44 ` G. Branden Robinson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C7C07444-7344-4DDF-B146-7392FD30631A@gmail.com \
--to=aaronscohen@gmail.com \
--cc=lm@mcvoy.com \
--cc=tuhs@tuhs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).