------------------------------------------------------------------------------ Terminfo commands setenv TERMINFO {dir} Directory where your EXTRA terminfo settings are stored. In this directory each terminfo file is stored under {initial_letter}{terminfo_file}. For example "xterm" will be stored as $TERMINFO/x/xterm If the system does not find your terminal settings in this directory it will look for it in the systen terminfo area, generally "/usr/share/lib/terminfo". infocmp -1 {term} > {ascii_source} Output all the terminfo settings found for the given terminal in an ascii source format, one per line. If you like this in termcap format add a -C option. infocmp -d -A /usr/share/terminfo -B lib/terminfo xterm-256color Compare the system version against my own version listing just the differences tic -o $TERMINFO {ascii_source} Recompile the infocmp output of the terminals terminfo back into the database given by the TERMINFO environment variable. A file is generated for every terminal type given in the source file. toe -ah List all the term types (in order with a directory comment) man terminfo What all the terminfo codes mean. ------------------------------------------------------------------------------ VI and terminfo Sun 'vi' (under SunOS 4.1.1) looks at SysV terminfo ONLY, and to have a local terminfo file means convert a termcap entry to terminfo format using 'captoinfo' and then compiled the convert file using `tic' and put the stuff in a local directory. The last thing is to 'setenv TERMINFO' to point to that local directory and vi will work happily with the local terminal setup. --- sun@me.utoronto.ca To get the information from a terminfo database without the database source available use the system V command "infocmp" to dump the source for the current TERM. --- Terry Lambert <terry@icarus.weber.edu> ------------------------------------------------------------------------------ Alternitive Screens Under SunOS vi and less use an alternative screen in xterms to do their work leaving the normal command line display as is. Under Solaris this is not done as it is using a terminfo database instead of termcap. The escape sequences are (for xterms) -- Start Alternitive Screen ^[[?47h End Alternitive Screen ^[[?47l The terminfo entries are smcup and rmcup or for a termcap program start/end sequences are :ti=\E7\E[?47h:te=\E[2J\E[?47l\E8: terminfo... check with infocmp -C xterm Modification I made for old Sun Machines. (probably no longer needed) xterm-solaris: A copy of the Solaris xterm termcap entry then modified. Enable the `Alturnative Screen' for use by editors and pager commands. Specifically so the current working commands are NOT over-written when editing files. Allowing better cut-n-paste of previous commands and their output. The reason for its non presence on many systems is that basically it use in `smcup' (start cursor mode) is not needed. This is needed more for Solaris Systems than on anything else. Terminfo codes Added... smcup=\E7\E[?47h, rmcup=\E[2J\E[?47l\E8, Alt graphics characters mode codes ^N and ^O do not work on the sun openwin xterm!!!!! However the other version {ESC}(B and {ESC}(0 do work fine! So replace them. In any case I substitute these codes in any scripts I use graphic characters in (Eg: my "percent" script), so that they work as expected regardless of the xterm used. Terminfo codes Modified... smacs=\E(0, rmacs=\E(B, NOTE: I use make changes to set a color (green) for bold, specifically to highlight my command line prompt even more. I nolonger do this however, prefering to set a color prompt in the "set_prompt" script directly. ------------------------------------------------------------------------------ Amiga termcap entries.. FROM Kent Polk (version 1.3 -- 1991) AA|amiga|Amiga ANSI:\ :co#80:li#24:am:bs:bw:\ :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:\ :LE=\E[%dD:RI=\E[%dC:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:IC=\E[%d@:\ :ae=\017:al=\E[L:as=\016:bl=\007:bt=\E[Z:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\ :cm=\E[%i%d;%dH:dc=\E[P:dl=\E[M:do=\E[B:ho=\E[H:ic=\E[@:is=\E[20l:\ :k1=\E0~:k2=\E1~:k3=\E2~:k4=\E3~:k5=\E4~:k6=\E5~:k7=\E6~:k8=\E7~:k9=\E8~:\ :k0=\E9~:kn#10:kb=^H:kd=\EB:kl=\ED:kr=\EC:ku=\EA:le=\E[D:\ :mb=\E[7;2m:md=\E[1m:me=\E[0m:mh=\E[2m:mk=\E[8m:mr=\E[7m:nd=\E[C:\ :rs=\Ec:se=\E[0m:sf=\E[S:so=\E[7m:sr=\E[T:ue=\E[0m:up=\E[A:us=\E[4m:\ :vb=\007:ve=\E[\040p:vi=\E[\060\040p:xn: alias amiga "setenv TERMCAP path/amiga; set term = amiga" I have the following lines in my .cshrc: (modified by me Anthony) #--------Amiga termcap by Kent Polk------- a dnet 'setenv TERMCAP "dnet:`termsz`:am:bs:bw:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:ae=\017:al=\E[L:as=\016:bl=\007:bt=\E[Z:cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:dc=\E[P:dl=\E[M:do=\E[B:ho=\E[H:ic=\E[@:is=\E[20l:k1=\E0~:k2=\E1~:k3=\E2~:k4=\E3~:k5=\E4~:k6=\E5~:k7=\E6~:k8=\E7~:k9=\E8~:k0=\E9~:kb=^H:kd=\EB:kl=\ED:kr=\EC:ku=\EA:le=\E[D:mb=\E[7;2m:md=\E[1m:me=\E[0m:mh=\E[2m:mk=\E[8m:mr=\E[7m:nd=\E[C:nl=\E[B:rs=\Ec:se=\E[0m:sf=\E[S:so=\E[7m:ue=\E[0m:up=\E[A:us=\E[4m:ve=\E[\040p:vi=\E[\060\040p:xn:pt:if=/usr/lib/tabset/vt100:";set term=dnet' #------------------------------ termsz is the following script: #!/bin/sh stty all 2>&1 >/dev/tty | awk 'NR==1 { for(i=1;i<=NF;i++) { if($i~/^rows/) rows=$(i-1) if($i~/^columns/) cols=$(i-1) } if(rows==0) rows=24 if(cols==0) cols=80 print "li#" rows ":co#" cols exit } ' Whenever the windowsize is changed I only have to type the command dnet to correct the TERMCAP contents. -------------------------------------------------------------------------------