bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-ncurses] [PATCH 12/40] man/tput.1: Revise (1/10) (NAME, SYNOPSI


From: G. Branden Robinson
Subject: Re: [bug-ncurses] [PATCH 12/40] man/tput.1: Revise (1/10) (NAME, SYNOPSIS, DESCRIPTION introduction).
Date: Wed, 17 Jan 2024 11:41:03 -0600

[self-follow-up]

At 2024-01-16T08:12:53-0600, G. Branden Robinson wrote:
> All of this is why, in my opinion, a man page should document what
> _it_
[the aspect of the system it is documenting]
> supports, and not make assumptions about how $PATH or $MANPATH are
> configured on the system.  "What _it_ supports" includes special
> handling of argv[0].
> 
> If you were to claim that it's a bit weird for tput(1) and tset(1) to
> change their behavior by inspecting their own argv[0], I would not
> contradict you.  This used to be more common in Unix systems, but it
> seems that over the decades, common practice has come to dance to a tune
> the GNU Coding Standards have been calling since the 1990s (which may in
> turn have been adapted from an even older source of conventional wisdom
> unknown to me).

Interestingly (to me), this issue of what a program does with its
argv[0] came up in a meeting of the Austin Group--the committee that
prepares the POSIX standard--this week.

https://austingroupbugs.net/view.php?id=1789

Unless further changed, the following language will appear in the first
technical corrigendum to POSIX 2024.  (POSIX 2024 isn't "out" yet, but
is frozen pending balloting at ISO, as I understand it.)

"Most applications pass a filename string or a pathname string, a
filename string is more generally useful, since the common usage of
argv[0] is in printing diagnostics. In some cases the filename in the
string passed is not the actual filename of the file; for example, many
implementations of the login utility use a convention of prefixing a
<hyphen-minus> ('-') to the actual filename, which indicates to the
command interpreter being invoked that it is a ``login shell''."

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]