[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tput(1) -T without a tty
From: |
Lauri Tirkkonen |
Subject: |
Re: tput(1) -T without a tty |
Date: |
Thu, 5 Oct 2017 08:11:46 +0300 |
User-agent: |
Mutt/1.9.0 (2017-09-02) |
On Wed, Oct 04 2017 20:59:02 -0400, Thomas Dickey wrote:
> > But using ncurses tput, which requires a tty, the illumos build cannot
> > be run from cron. I've thrown together the following quick patch to
> > avoid opening a tty if -T is given; is this a reasonable use case?
>
> hmm - rather than special-case "-T", why not a new option to tell it
> to not attempt to modify the terminal modes?
My thinking here was that if you're using -T, you're not looking to
update terminal modes but just querying the terminfo database (after all
the first line of the manpage reads "initialize a terminal or query
terminfo database"). I'm ok with a new option too, but on the off chance
that there's any other software that expects to be able to query the
database without a tty, it'll have to be modified to use this new option
for ncurses tput too.
> Offhand, neither tset/tput has a "-f" (force) option...
>
> Solaris tput doesn't special-case "-T", it simply ignores the failure
> to update the terminal modes.
Interesting. I'm not sure what's the correct approach here.
--
Lauri Tirkkonen | lotheac @ IRCnet