The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Aaron <aaronscohen@gmail.com>
To: tuhs@tuhs.org
Subject: [TUHS] Re: Of flags and keyletters
Date: Sun, 3 Mar 2024 12:38:20 -0500	[thread overview]
Message-ID: <9C2BE9BE-F241-416A-9966-820FB21FD5C0@gmail.com> (raw)
In-Reply-To: <20240302221426.6DE6818C083@mercury.lcs.mit.edu>

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

  reply	other threads:[~2024-03-03 17:38 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 [this message]
2024-03-03 17:52   ` Larry McVoy
2024-03-03 19:28     ` Aaron
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=9C2BE9BE-F241-416A-9966-820FB21FD5C0@gmail.com \
    --to=aaronscohen@gmail.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).