1 |
On Sun, 21 Aug 2005 18:43:54 -0400 Dan Meltzer |
2 |
<parallelgrapefruit@×××××.com> wrote: |
3 |
| putty pretends to be an xterm and dies at xtermcontrol --get-bg... I |
4 |
| can test other things if you need.. just give me some idea :) |
5 |
|
6 |
Thanks. The other useful one is to see whether it does 256 colours |
7 |
properly like real xterm does. The following bash script, when run with |
8 |
'256' as its argument, should look the same as it does when run under |
9 |
a real xterm. |
10 |
|
11 |
|
12 |
#!/usr/bin/env bash |
13 |
# vim: set sw=4 sts=4 et : |
14 |
|
15 |
[[ -z "${1}" ]] && cat <<END && exit 1 |
16 |
Usage: ${0} [count] |
17 |
|
18 |
count should usually be either 88 (rxvt-based terminals) or 256 |
19 |
(xterm-based terminals). |
20 |
END |
21 |
|
22 |
echo -n " 0: " |
23 |
for (( a = 0 ; a < ${1} ; a++ )) ; do |
24 |
echo -n -e "\e[38;5;${a#0}m#\e[48;5;${a#0}mX\e[0;0m " |
25 |
[[ -z "${a##*9}" ]] && echo -n -e "\n\e[0;0m$(printf '%3d' ${a} ): " |
26 |
done |
27 |
echo -e "\e[0;0m" ; echo |
28 |
|
29 |
|
30 |
-- |
31 |
Ciaran McCreesh : Gentoo Developer (Vim, Shell tools, Fluxbox, Cron) |
32 |
Mail : ciaranm at gentoo.org |
33 |
Web : http://dev.gentoo.org/~ciaranm |