bug-ncurses
[Top][All Lists]
Advanced

[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 11:32:34 +0300
User-agent: Mutt/1.9.0 (2017-09-02)

On Thu, Oct 05 2017 04:27:06 -0400, Thomas Dickey wrote:
> I don't agree: the intent of "-T" was to override $TERM
> 
> SYNOPSIS
>        tput [-Ttype] capname [parms ... ]
>        tput [-Ttype] init
>        tput [-Ttype] reset
>        tput [-Ttype] longname
>        tput -S  <<
>        tput -V
> 
> The first usage is for querying, while init/reset initialze the terminal.
> (longname also is for querying).  Neither capname or longname have to
> modify the terminal modes, but init/reset aren't complete unless they
> do the modifications.

Ok, thanks for clarifying. But querying for a capname doesn't work
without a tty right now either:

    % ssh localhost tput -T xterm init_1sting
    tput: terminal attributes: No such device or address

> I'd expect scripts such as you're talking about to use the capname
> (capabilities _other_ than init/reset) to obtain specific capabilities.
> After all, these are terminfo names:
> 
>        reset_1string                 rs1        r1        reset string
>        reset_2string                 rs2        r2        reset string
>        reset_3string                 rs3        r3        reset string
> 
>        init_1string                  is1        i1        initialization
>                                                           string
>        init_2string                  is2        is        initialization
>                                                           string
>        init_3string                  is3        i3        initialization
>                                                           string
> 
> while init/reset are combinations of capabilities.

Thanks, this makes sense. It seems like init/reset should insist on a
tty, but querying for capabilities should not. I confused this with -T.

-- 
Lauri Tirkkonen | lotheac @ IRCnet



reply via email to

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