zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-users@sunsite.dk
Subject: Re: Teaching zsh about a term variable?
Date: Fri, 06 Aug 2004 10:30:07 +0100	[thread overview]
Message-ID: <200408060930.i769U7WS028673@news01.csr.com> (raw)
In-Reply-To: "Vincent Lefevre"'s message of "Thu, 05 Aug 2004 23:37:30 +0200." <20040805213730.GV2892@ay.vinc17.org>

Vincent Lefevre wrote:
> On 2004-08-05 13:34:46 -0700, Mac Mason wrote:
> > So, does anybody know where in the myriad config files I should say
> > "hey, zsh, look here for more terminal definitons" and what the syntax
> > of that would be?
> 
> Perhaps the TERMINFO environment variable?

Yes, that's usually the way to go.  Actually, it's probably something
simple if it works in tcsh.  But here's how to set it up from scratch.

I have

export TERMINFO=~/lib/terminfo

and the directory ~/lib/terminfo contains

c v x

with entries for cygwin, vs100 and xterm respectively.  The files are
compiled with `tic' (which uses $TERMINFO to find out where to put the
files).  You can can get a source file from a similar terminal (if you
know what one is) using `infocmp -I similar-term', which you can edit.

Of course, knowing how the terminal works is another matter.  Here's the
source for the xterm entry I use on Solaris which (apparently) supports
colour, output with infocmp -I.

#	Reconstructed via infocmp from file: /home/pws/lib/terminfo/x/xterm
xterm|vs100|xterm terminal emulator,
	am, km, mir, msgr, xenl,
	cols#80, it#8, lines#65,
	acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
	bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J,
	cr=\r, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\b,
	cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C,
	cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
	dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
	ed=\E[J, el=\E[K, el1=\E[1K$<3>, enacs=\E(B\E)0,
	home=\E[H, ht=\t, hts=\EH, ich=\E[%p1%d@, ich1=\E[@,
	il=\E[%p1%dL, il1=\E[L, ind=\n, ka1=\EOq, ka3=\EOs,
	kb2=\EOr, kbs=\b, kc1=\EOp, kc3=\EOn, kcub1=\EOD,
	kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kent=\EOM,
	kf0=\E[21~, kf1=\E[11~, kf10=\EOx, kf2=\E[12~,
	kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~,
	kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, rc=\E8, rev=\E[7m,
	ri=\EM, rmacs=^O, rmkx=\E[?1l\E>, rmso=\E[m,
	rmul=\E[m,
	rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H, rs2=@,
	sc=\E7,
	sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t^N%e^O%;,
	sgr0=\E[m, smacs=^N, smkx=\E[?1h\E=, smso=\E[7m,
	smul=\E[4m, tbc=\E[3g,

Here's `infocmp -I xterm-color' from Fedora Core 2.

#       Reconstructed via infocmp from file: /usr/share/terminfo/x/xterm-color
xterm-color|nxterm|generic color xterm, 
        am, xenl, km, mir, msgr, 
        cols#80, it#8, lines#24, colors#8, pairs#64, ncv@, 
        acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 
        bel=^G, cr=^M, csr=\E[%i%p1%d;%p2%dr, tbc=\E[3g, 
        clear=\E[H\E[2J, el=\E[K, ed=\E[J, cup=\E[%i%p1%d;%p2%dH, 
        cud1=^J, home=\E[H, cub1=^H, cuf1=\E[C, cuu1=\E[A, dch1=\E[P, 
        dl1=\E[M, enacs=\E)0, smacs=^N, bold=\E[1m, 
        smcup=\E7\E[?47h, smir=\E[4h, rev=\E[7m, smso=\E[7m, 
        smul=\E[4m, rmacs=^O, sgr0=\E[m, rmcup=\E[2J\E[?47l\E8, 
        rmir=\E[4l, rmso=\E[m, rmul=\E[m, 
        is2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>, 
        il1=\E[L, kbs=^H, kdch1=\E[3~, kcud1=\EOB, kf1=\E[11~, 
        kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, 
        kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, 
        kf18=\E[32~, kf19=\E[33~, kf2=\E[12~, kf20=\E[34~, 
        kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, 
        kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, kich1=\E[2~, 
        kcub1=\EOD, kmous=\E[M, knp=\E[6~, kpp=\E[5~, kcuf1=\EOC, 
        kslt=\E[4~, kcuu1=\EOA, rmkx=\E[?1l\E>, smkx=\E[?1h\E=, 
        op=\E[m, dch=\E[%p1%dP, dl=\E[%p1%dM, cud=\E[%p1%dB, 
        il=\E[%p1%dL, cub=\E[%p1%dD, cuf=\E[%p1%dC, 
        cuu=\E[%p1%dA, 
        rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>, rc=\E8, 
        sc=\E7, ind=^J, ri=\EM, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, 
        hts=\EH, ht=^I, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, 
        u9=\E[c, 

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


  reply	other threads:[~2004-08-06  9:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-05 20:34 Mac Mason
2004-08-05 21:37 ` Vincent Lefevre
2004-08-06  9:30   ` Peter Stephenson [this message]
2004-08-06 14:40     ` Vincent Lefevre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200408060930.i769U7WS028673@news01.csr.com \
    --to=pws@csr.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).