From owner-freebsd-questions Fri Feb 18 5:25:55 2000 Delivered-To: freebsd-questions@freebsd.org Received: from smtp7.xs4all.nl (smtp7.xs4all.nl [194.109.127.50]) by hub.freebsd.org (Postfix) with ESMTP id 8156D37B8AC for ; Fri, 18 Feb 2000 05:25:50 -0800 (PST) (envelope-from rene@xs4all.nl) Received: from 10.67.192.9 (adsl-196-149.adsl.xs4all.nl [194.109.196.149]) by smtp7.xs4all.nl (8.9.3/8.9.3) with ESMTP id OAA23263 for ; Fri, 18 Feb 2000 14:25:47 +0100 (CET) From: rene@xs4all.nl Date: Fri, 18 Feb 2000 14:31:19 +0100 X-Mailer: The Bat! (v1.38e) S/N B56A3CE9 / Personal Reply-To: rene@xs4all.nl Organization: XS4ALL Internet B.V. Nederland X-Priority: 3 (Normal) Message-ID: <2605.000218@xs4all.nl> To: questions@freebsd.org Subject: echo and ANSI sequences? Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello questions, I'm trying to teach my SSH window colors. I'm currently trying to get ANSI's 'reverse video' function to work. The deal is that I have an export PS1 that includes ANSI sequences that get rendered just fine. However, I'd like to 'simply' send an ANSI invert-video when I wanna switch (because the sun's just moved in the perfect glare-position ;). Echo, however, doesn't wanna play. I suspect the parsing of \e doesnt become a 1-byte ESC-character :(( Any idea how I can best send this ANSI-sequence to my console? 9# cat /usr/bin/scripts/stc if [ $TERM != xterm ]; then echo "You're not running this from inside an x-term. Aborting." else case $1 in (b | black | B | BLACK) echo \e[0m\] ;; (w | white | W | WHITE) echo \e[7m\] ;; esac fi [root@messenger:/ date/time: Fri Feb 18/14:24:12] 10# stc w e[7m] [root@messenger:/ date/time: Fri Feb 18/14:24:19] 11# Greetings, rene To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message