bug-ncurses
[Top][All Lists]
Advanced

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

Re: Which terminal is similar to dumb but with color support?


From: Thomas Dickey
Subject: Re: Which terminal is similar to dumb but with color support?
Date: Mon, 1 Jun 2015 20:47:45 -0400 (EDT)

----- Original Message -----
| From: "Peng Yu" <address@hidden>
| To: address@hidden, "Thomas E. Dickey" <address@hidden>
| Sent: Sunday, May 31, 2015 9:06:05 PM
| Subject: Re: Which terminal is similar to dumb but with color support?
| 
| Hi Thomas,
| 
| >> The following command can not print the output in color format.
| >>
| >> vim -T dumb -c 'echohl ErrorMsg' -c 'echo "Hello World!"' -c q
| >
| > That's expected.  By the way, vim is not using the terminal
| > description
| > from ncurses for "dumb", which looks like this:
| >
| >         dumb|80-column dumb tty,
| >                 am,
| >                 cols#80,
| >                 bel=^G, cr=^M, cud1=^J, ind=^J,
| 
| I only know using tput to check the info about a terminal. But I have
| explicit specific the capname. How can you extract all the
| information
| above a terminal as you did above? Thanks.


I ran

    infocmp dumb

| $ tput -T dumb cols
| 
| > I can see that it is not using the terminal description because it
| > uses
| > cursor-positioning (which is absent from "dumb"):
| >
| >         \n\f
| >         \E[40;1HHello World!\r\r\r
| >         \n
| 
| I got this. How did you get the more readable format as the above?

I used the unmap program which you can find at

invisible-island.net/misc_tools/index.html#item:unmap

| Thanks.
| 
| $ vim -T dumb -c 'echohl ErrorMsg' -c 'echo "Hello World!"' -c q|cat
| -v
| Vim: Warning: Output is not to a terminal
| ^L^[[78;1HHello World!^M^M
| 
| 
| >> The following command can print the output in color format. But it
| >> also print a lot of empty lines.
| >>
| >> vim -T xterm-colors -c 'echohl ErrorMsg' -c 'echo "Hello World!"'
| >> -c q
| >
| > Actually, I get just a reverse-video (no color).
| > Again, whatever vim uses for "xterm-colors" is not from ncurses.
| > (Perhaps you meant "xterm-color", although that also gave me no
| > color).
| >
| >> I just want to print the output in color with vim without print a
| >> lot
| >> of empty lines.
| >
| > If it is printing empty lines, that likely is because the
| > description
| > that vim uses says that the terminal does not implement the "clear"
| > capability, and is simulating it.
| >
| >> I have tried to tput to check all the terminals in my system (Mac
| >> and
| >> Ubuntu). But it is hard to find what I want. Could anybody let me
| >> know
| >> there is such a terminal available? Thanks.
| >
| > It is unlikely that one exists; you might be able to write a
| > terminal
| > description which makes vim do what you want.
| 
| Do you know where I should start? Thanks.
| 
| --
| Regards,
| Peng
| 

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



reply via email to

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