On Sat, 27 Oct 2007, Atom Smasher wrote:

>         :co#80:it#8:li#24:Co#64:pa#32717:\
==========

make that: Co#256:pa#32767:

still some residual weirdness around termcap vs terminfo... note that the 
termcap and terminfo arrays are zsh specific.

        % print ${TERM}
        rxvt
        % print ${terminfo[colors]}
        256
        % print ${termcap[colors]}
        105
        % tput colors
        105

so now any updates to the system termcap file are reflected through the 
terminfo system, but *not* through the termcap system. tput uses termcap.

got it!!! i think....

        % print ${termcap[colors]}
        105
        % print ${termcap[Co]}
        256

        % tput colors Co
        105
        256

freebsd's tput, it seems, is getting confused between "colors" and "Co". 
ok... on both freeBSD and linux (ubuntu), zsh's termcap[colors] is 
~actually~ returning the columns in the terminal. on freeBSD (but not 
linux) `tput colors` is also showing the columns, not the colors. on 
freeBSD `tput Co` does show the colors, but on linux it chokes. something 
is screwy, and i'm not even sure if this is a bug in freeBSD's tput or 
linux's tput.

in zsh's termcap array (on BSD or linux) i can specify "colors", "co", 
"co_foobar" or whatever, and it's actually telling me "termcap[co]" which 
is columns. freeBSD's tput is doing the same thing (but on linux it chokes 
if extra stuff is appended to the capability name). linux's tput is 
converting "colors" on the command line to "Co" in the capabilities. but 
maybe it's *not* a bug, but rather an incompatibility: freeBSD's tput is 
documented as using termcap, linux's tput is documented as using terminfo. 
i guess i shouldn't really expect them to take the same capability 
arguments in the same format (although it would be convenient). ok, so i 
guess it's not a bug, just a false assumption that tput behaves the same 
on freeBSD and linux.

i'm done thinking out loud now...


-- 
         ...atom

  ________________________
  http://atom.smasher.org/
  762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
  -------------------------------------------------

        "War will cease when men refuse to fight."
                -- F. Hansen



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Materm-usage mailing list
Materm-usage@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/materm-usage
Mrxvt home page: http://materm.sourceforge.net

Reply via email to