help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Where is $TERM documented?


From: Chet Ramey
Subject: Re: [Help-bash] Where is $TERM documented?
Date: Sat, 04 May 2013 19:56:22 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130328 Thunderbird/17.0.5

On 5/4/13 1:40 PM, Peng Yu wrote:
> Hi,
> 
> I see the following variable in my bash. But I don't find it in the
> bash manual. Does anybody know where it is documented? Thanks.

Well, you can start with

man -k environment

and find the `environ' man page in section 7.  Running `man 7 environ'
shows, in part,

TERM       The kind of terminal for which output is to be prepared.  This
           information is used by commands, such as nroff(1) or plot(1)
           which may exploit special terminal capabilities.  See
           /usr/share/misc/termcap (termcap(5)) for a list of terminal
           types.

Bash doesn't document TERM itself, since it doesn't set or use it directly,
but does list it in the output of `help variables':

    TERM        The name of the current terminal type.

Readline uses the value of TERM to set its rl_terminal_name variable and as
the default argument for the rl_reset_terminal() function, which it
documents in the texinfo manual describing the programming interface.  It
uses TERM in the same way as any other application: as an index into the
system's terminal description database to discover terminal capabilities it
uses to control redisplay.

You can find what Posix has to say about TERM in

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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