The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] Of flags and keyletters
@ 2024-02-29 17:21 Dave Horsfall
  2024-02-29 17:59 ` [TUHS] " segaloco via TUHS
  2024-03-01  5:44 ` G. Branden Robinson
  0 siblings, 2 replies; 16+ messages in thread
From: Dave Horsfall @ 2024-02-29 17:21 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

Just recollecting old memories: why did AT&T refer to "flags" as 
"keyletters" in its SysV documentation?  Some sort of denial of 
Ed5/6/7/BSD's very existence?

The one good they did was the TTY driver...

-- Dave, who used to work for a SysVile shop

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [TUHS] Re: Of flags and keyletters
  2024-02-29 17:21 [TUHS] Of flags and keyletters Dave Horsfall
@ 2024-02-29 17:59 ` segaloco via TUHS
  2024-03-01  5:30   ` Dave Horsfall
  2024-03-01  5:44 ` G. Branden Robinson
  1 sibling, 1 reply; 16+ messages in thread
From: segaloco via TUHS @ 2024-02-29 17:59 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

On Thursday, February 29th, 2024 at 9:21 AM, Dave Horsfall <dave@horsfall.org> wrote:

> Just recollecting old memories: why did AT&T refer to "flags" as
> "keyletters" in its SysV documentation? Some sort of denial of
> Ed5/6/7/BSD's very existence?
> 
> The one good they did was the TTY driver...
> 
> -- Dave, who used to work for a SysVile shop

Curious Dave if you have a particular piece of documentation in mind?  I'm mostly finding the term "keyletter" in SCCS manpages and pages related to the lp print system.  This nomenclature appears to go back as far as Release 4.0 of SCCS/PWB on February 18, 1977, it is also used throughout the PIB regarding this release.

Maybe a nomenclature practice by some of the USG/PWB-side folks that slowly crept in?  Fwiw I generally see command-line bits as "options" throughout much documentation, with flag and option being used quite interchangeably, I don't get many hits at all in the 1983 System V manpage sources for "keyletter".

- Matt G.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [TUHS] Re: Of flags and keyletters
  2024-02-29 17:59 ` [TUHS] " segaloco via TUHS
@ 2024-03-01  5:30   ` Dave Horsfall
  0 siblings, 0 replies; 16+ messages in thread
From: Dave Horsfall @ 2024-03-01  5:30 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

On Thu, 29 Feb 2024, segaloco via TUHS wrote:

> Curious Dave if you have a particular piece of documentation in mind?  
> I'm mostly finding the term "keyletter" in SCCS manpages and pages 
> related to the lp print system.  This nomenclature appears to go back as 
> far as Release 4.0 of SCCS/PWB on February 18, 1977, it is also used 
> throughout the PIB regarding this release.

You're right; it was SCCS, not SysV.  Dunno what I was thinking...

Thanks.

-- Dave

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [TUHS] Re: Of flags and keyletters
  2024-02-29 17:21 [TUHS] Of flags and keyletters Dave Horsfall
  2024-02-29 17:59 ` [TUHS] " segaloco via TUHS
@ 2024-03-01  5:44 ` G. Branden Robinson
  1 sibling, 0 replies; 16+ messages in thread
From: G. Branden Robinson @ 2024-03-01  5:44 UTC (permalink / raw)
  To: tuhs

[-- Attachment #1: Type: text/plain, Size: 372 bytes --]

At 2024-03-01T04:21:44+1100, Dave Horsfall wrote:
> Just recollecting old memories: why did AT&T refer to "flags" as
> "keyletters" in its SysV documentation?  Some sort of denial of
> Ed5/6/7/BSD's very existence?

Not exactly the same thing, but Lesk used the term to characterize the
format specifiers in the Seventh Edition Volume 2 paper on tbl(1).

Regards,
Branden

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [TUHS] Re: Of flags and keyletters
  2024-03-03 17:38 ` Aaron
  2024-03-03 17:52   ` Larry McVoy
@ 2024-03-03 21:24   ` Rich Salz
  1 sibling, 0 replies; 16+ messages in thread
From: Rich Salz @ 2024-03-03 21:24 UTC (permalink / raw)
  To: Aaron; +Cc: tuhs

[-- Attachment #1: Type: text/plain, Size: 513 bytes --]

On Sun, Mar 3, 2024 at 12:38 PM Aaron <aaronscohen@gmail.com> wrote:

> Having written the first versions of getopt(3), getopt(1), and associated
> man pages around 1979 ...
>

I always thought that this was a brilliant piece of engineering.  In less
than 70 lines, it was a clever, but not obtuse, bit of code to handle the
most common option/flag/switch usages that pervaded the Unix ecosystem at
the time.  Thanks for that!

Source: https://www.linux.co.cr/unix-source-code/review/1985/1103.html

[-- Attachment #2: Type: text/html, Size: 898 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [TUHS] Re: Of flags and keyletters
  2024-03-03 17:52   ` Larry McVoy
@ 2024-03-03 19:28     ` Aaron
  0 siblings, 0 replies; 16+ messages in thread
From: Aaron @ 2024-03-03 19:28 UTC (permalink / raw)
  To: Larry McVoy, tuhs

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [TUHS] Re: Of flags and keyletters
  2024-03-03 17:38 ` Aaron
@ 2024-03-03 17:52   ` Larry McVoy
  2024-03-03 19:28     ` Aaron
  2024-03-03 21:24   ` Rich Salz
  1 sibling, 1 reply; 16+ messages in thread
From: Larry McVoy @ 2024-03-03 17:52 UTC (permalink / raw)
  To: tuhs

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [TUHS] Re: Of flags and keyletters
  2024-03-02 22:14 Noel Chiappa
@ 2024-03-03 17:38 ` Aaron
  2024-03-03 17:52   ` Larry McVoy
  2024-03-03 21:24   ` Rich Salz
  0 siblings, 2 replies; 16+ messages in thread
From: Aaron @ 2024-03-03 17:38 UTC (permalink / raw)
  To: tuhs

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [TUHS] Re: Of flags and keyletters
@ 2024-03-02 22:14 Noel Chiappa
  2024-03-03 17:38 ` Aaron
  0 siblings, 1 reply; 16+ messages in thread
From: Noel Chiappa @ 2024-03-02 22:14 UTC (permalink / raw)
  To: tuhs; +Cc: jnc

    > 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [TUHS] Re: Of flags and keyletters
  2024-03-02  0:33   ` silas poulson via TUHS
@ 2024-03-02 18:53     ` Lars Brinkhoff
  0 siblings, 0 replies; 16+ messages in thread
From: Lars Brinkhoff @ 2024-03-02 18:53 UTC (permalink / raw)
  To: silas poulson via TUHS; +Cc: silas poulson

silas poulson wrote:
> Bakul Shah wrote:
>> Use of "flag" for this purpose seems strange. "option" makes more sense
> I always took it to be a semi descriptive joke, like “mouse”, with the 
> sort of flag you wave.

At this point we should recall the quote "cat came back from Berkeley
waving flags", attributed to Rob Pike.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [TUHS] Re: Of flags and keyletters
  2024-03-02 18:24   ` Paul Winalski
@ 2024-03-02 18:35     ` Warner Losh
  0 siblings, 0 replies; 16+ messages in thread
From: Warner Losh @ 2024-03-02 18:35 UTC (permalink / raw)
  To: Paul Winalski; +Cc: Bakul Shah, TUHS main list

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

On Sat, Mar 2, 2024, 11:24 AM Paul Winalski <paul.winalski@gmail.com> wrote:

> On 3/1/24, Bakul Shah via TUHS <tuhs@tuhs.org> wrote:
> >
> > Use of "flag" for this purpose seems strange. "option" makes more sense.
>
> I think the term "flag" for command line options comes from the way
> that those options are typically implemented in code.  The command
> line options are usually used to set a boolean variable in the program
> that can be tested to see if the option was present.
>
> "Flag" as a synonym for a boolean variable in turn comes from the
> ordinary English verb "to flag", meaning "to mark or identify"
>

And the variables set were named Xflag.

Warner

>

[-- Attachment #2: Type: text/html, Size: 1388 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [TUHS] Re: Of flags and keyletters
  2024-03-01 16:56 ` Bakul Shah via TUHS
  2024-03-02  0:33   ` silas poulson via TUHS
@ 2024-03-02 18:24   ` Paul Winalski
  2024-03-02 18:35     ` Warner Losh
  1 sibling, 1 reply; 16+ messages in thread
From: Paul Winalski @ 2024-03-02 18:24 UTC (permalink / raw)
  To: Bakul Shah; +Cc: TUHS main list

On 3/1/24, Bakul Shah via TUHS <tuhs@tuhs.org> wrote:
>
> Use of "flag" for this purpose seems strange. "option" makes more sense.

I think the term "flag" for command line options comes from the way
that those options are typically implemented in code.  The command
line options are usually used to set a boolean variable in the program
that can be tested to see if the option was present.

"Flag" as a synonym for a boolean variable in turn comes from the
ordinary English verb "to flag", meaning "to mark or identify"

-Paul W.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [TUHS] Re: Of flags and keyletters
  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
  1 sibling, 1 reply; 16+ messages in thread
From: silas poulson via TUHS @ 2024-03-02  0:33 UTC (permalink / raw)
  To: TUHS main list


> On 1 Mar 2024, at 16:56, Bakul Shah via TUHS <tuhs@tuhs.org> wrote:
> Use of "flag" for this purpose seems strange. "option" makes more sense

I always took it to be a semi descriptive joke, like “mouse”, with the 
sort of flag you wave. At least that’s what I assumed the origin was.

Silas


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [TUHS] Re: Of flags and keyletters
  2024-03-01 16:23 ` [TUHS] " Steve Nickolas
@ 2024-03-01 19:44   ` Paul Winalski
  0 siblings, 0 replies; 16+ messages in thread
From: Paul Winalski @ 2024-03-01 19:44 UTC (permalink / raw)
  To: Steve Nickolas; +Cc: TUHS main list

On 3/1/24, Steve Nickolas <usotsuki@buric.co> wrote:
> On Fri, 1 Mar 2024, Douglas McIlroy wrote:
>
>> One might argue that replacing "flag" by "option", thus doubling the
>> number
>> of syllables, was a small step in that direction. In fact it was a
>> deliberate attempt to discard jargon in favor of normal English usage.

IBM did a similar thing in their use of the term "main storage" for
what the whole rest of the industry calls "main memory".  They felt
that "memory" was too anthropomorphic.

> I prolly got the term "switch" from IBM/Microsoft, but that's the term I'm
> used to (and my own implementations of Unix utilities do use the term in
> their error messages).

The term "switch" for command line options is pretty much
universal--it's not IBM specific and predates the existence of
Microsoft by about two decades.

Back in the 1950s when you ran one program at a time on a computer,
there were toggle switches on the control panel that could be read by
the running program.  Combinations of these were in common use to
select various options of program behavior.  When operating systems
came along, you couldn't pass the info to running programs by having
the operator physically flip a switch on the console.  I remember that
IBM DOS/360 had a Job Control Language (JCL) statement "// UPSI" (UPSI
= User Program Switch Indicators) that allowed one to set the
"switches" as seen by the running user program.

When interactive and timesharing systems came along, they supported
command line options in place of the original switches.  In DEC's
operating systems for PDP-8 -10, and -11, these were originally a
slash character followed by a single letter or digit.  The slash was
used because it resembles a toggle switch.  Unix was using the slash
as a directory separator in pathnames and so they used the hyphen to
introduce command options instead.  Microsoft's command line interface
for the PC was modeled after DEC's RT-11 operating system and used
slash for command options.  When they implemented Unix-style directory
paths, they had to use backslash as the separator because forward
slash was already in use.

-Paul W.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [TUHS] Re: Of flags and keyletters
  2024-03-01 15:49 [TUHS] " Douglas McIlroy
  2024-03-01 16:23 ` [TUHS] " Steve Nickolas
@ 2024-03-01 16:56 ` Bakul Shah via TUHS
  2024-03-02  0:33   ` silas poulson via TUHS
  2024-03-02 18:24   ` Paul Winalski
  1 sibling, 2 replies; 16+ messages in thread
From: Bakul Shah via TUHS @ 2024-03-01 16:56 UTC (permalink / raw)
  To: TUHS main list



> On Mar 1, 2024, at 7:49 AM, Douglas McIlroy <douglas.mcilroy@dartmouth.edu> wrote:
> 
> > why did AT&T refer to "flags" as "keyletters" in its SysV documentation?
> 
> Bureaucracies beget bureaucratese--polysyllabic obfuscation, witness APPLICATION USAGE in place of BUGS.
> 
> One might argue that replacing "flag" by "option", thus doubling the number of syllables, was a small step in that direction. In fact it was a deliberate attempt to discard jargon in favor of normal English usage.

Use of "flag" for this purpose seems strange. "option" makes more sense.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [TUHS] Re: Of flags and keyletters
  2024-03-01 15:49 [TUHS] " Douglas McIlroy
@ 2024-03-01 16:23 ` Steve Nickolas
  2024-03-01 19:44   ` Paul Winalski
  2024-03-01 16:56 ` Bakul Shah via TUHS
  1 sibling, 1 reply; 16+ messages in thread
From: Steve Nickolas @ 2024-03-01 16:23 UTC (permalink / raw)
  To: TUHS main list

On Fri, 1 Mar 2024, Douglas McIlroy wrote:

> One might argue that replacing "flag" by "option", thus doubling the number
> of syllables, was a small step in that direction. In fact it was a
> deliberate attempt to discard jargon in favor of normal English usage.

I prolly got the term "switch" from IBM/Microsoft, but that's the term I'm 
used to (and my own implementations of Unix utilities do use the term in 
their error messages).

-uso.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-03-03 21:24 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-29 17:21 [TUHS] Of flags and keyletters 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
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-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
2024-03-03 21:24   ` Rich Salz

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).