bug-ncurses
[Top][All Lists]
Advanced

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

Re: [PATCH 12/40] man/tput.1: Revise (1/10) (NAME, SYNOPSIS, DESCRIPTION


From: Sven Joachim
Subject: Re: [PATCH 12/40] man/tput.1: Revise (1/10) (NAME, SYNOPSIS, DESCRIPTION introduction).
Date: Mon, 15 Jan 2024 17:42:48 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

On 2024-01-14 06:40 -0600, G. Branden Robinson wrote:

> At 2024-01-14T12:55:13+0100, Sven Joachim wrote:
>> On 2024-01-12 13:28 -0600, G. Branden Robinson wrote:
>>
>> > Content:
>> > * Add "init" as page topic name (like "reset"), since tput specially
>> >   supports being called by that name.
>>
>> Perhaps, but "init" is also the name of the program run as PID 1,
>
> I'm aware.  I've been using Unix since before systemd was a gleam in
> Lennart's Apple-aping po(e)ttering eye... ;-)

This is not the place for ramblings about systemd or Lennart Poettering.
Anyway, whoever has the idea of special-casing tput's argv[0] as "init"
must have been crazy, since I am sure that "init" was PID 1's name even
back then.

> I therefore don't see why what ncurses _installs_ is relevant.

It obviously is relevant for distribution packagers like Werner and me,
who need to remove or rename the init.1 symlink.

> What is
> being documented is that one can put a hard or symbolic link to tput
> called "init" in /usr/local/bin or $HOME/bin, and it will behave as
> documented ("tput init")[1].
>
> Further, ordinary users have little reason to run init(8).  I would
> expect users administrating their own systems to be sophisticated enough
> to realize that multiple man pages may be available under the same name
> (this is one reason why the manual has sections).  A classic example is
> "printf".

Manpages can have the same name, but sharing also the same section does
not work.

> $ man -aw printf
> /usr/share/man/man1/printf.1.gz
> /usr/share/man/man3/printf.3.gz
>
> $ man -aw init
> /home/branden/ncurses-HEAD/share/man/man1/tput.1
> /usr/share/man/man1/systemd.1.gz
>
> I see no deep distinction between these scenarios.

The latter leads to a file clash by default, the former does not.

>> This causes an init.1 symlink to tput.1 to be installed, which is bad
>> because there is no corresponding program and at least on Debian the
>> manpage clashes with the one provided by the systemd-sysv package.
>
> As noted, I don't see a real problem here, but I also don't see the
> construction of man page symlink farms as worthwhile _if_ the system's
> mandb(8) or makewhatis(8) program is adequate to the task of building
> indices of man pages.  I acknowledge: that circumstance may not obtain
> everywhere.  But by the same token, getting rid of the symlinks on such
> a system wouldn't solve the problem if that system _did have a competent
> indexer; the confusion you fear, and which I think you are overstating,
> would reappear thanks to the linkage constructed in the man page index
> used by man(1).

Getting rid of the symlinks and relying on indices only also requires
support in many other programs, for instance shell completion or Emacs'
man package currently rely on filenames.

> Finally, I would venture that the novice user at a shell prompt whose
> confusion you fear is likely going to be as interested (in more) on how
> to control the behavior of terminal, and particularly its recovery from
> a bad state, than in a command that is seldom used from the shell, and
> requires superuser privileges to run in the first place.

Novice users, and even most experienced users, have little use for
"tput init" either.  It's not like 25 years ago when there were endless
discussions about the behavior of the backspace key in Debian.

Anyway, this is for Thomas to decide and I will shut up now.

Cheers,
       Sven



reply via email to

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