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: Thomas Dickey
Subject: Re: tput(1) -T without a tty
Date: Thu, 5 Oct 2017 05:19:40 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Oct 05, 2017 at 11:32:34AM +0300, Lauri Tirkkonen wrote:
> 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

that's a bug (thanks)
 
> > 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.

no problem (my intent was to make tset/tput more consistent, so that
reset would "always" do the right thing).

-- 
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

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