[comp.sys.sgi] tcsh question

brad@lsr-vax.UUCP (Brad Zoltick - LMO) (05/22/91)

Is there a way to insert ANSI escape sequences into the prompt
string?  Under the C shell, you can customize your prompt by inserting
ANSI escape sequences. I have not been successful in getting any
escape sequences to work with the new prompt string within the TC shell.

Brad Zoltick
National Institutes of Health

UUCP:		...uunet!lsr-vax!brad
INTERNET:	lsr-vax!brad@uunet.uu.net or brad%lsr-vax.UUCP@uunet.uu.net

christos@theory.TC.Cornell.EDU (Christos S. Zoulas) (05/23/91)

In article <9105220715.AA22652@> brad@lsr-vax.UUCP (Brad Zoltick - LMO) writes:

>Is there a way to insert ANSI escape sequences into the prompt
>string?  Under the C shell, you can customize your prompt by inserting
>ANSI escape sequences. I have not been successful in getting any
>escape sequences to work with the new prompt string within the TC shell.

In 5.20.02 and above you can have escape sequences in the prompt inside
%{<your escape sequence goes here>%}
For example on a vt100 to turn reverse video on: %{\e[7m%}

RT?M
christos
-- 
Christos Zoulas         | 389 Theory Center, Electrical Engineering,
christos@ee.cornell.edu | Cornell University, Ithaca NY 14853.
christos@crnlee.bitnet  | Phone: (607) 255 0302, Fax: (607) 255 9072

pdc@lunch.wpd.sgi.com (Paul Close) (05/23/91)

brad@lsr-vax.UUCP (Brad Zoltick - LMO) writes:
>
>Is there a way to insert ANSI escape sequences into the prompt
>string?  Under the C shell, you can customize your prompt by inserting
>ANSI escape sequences. I have not been successful in getting any
>escape sequences to work with the new prompt string within the TC shell.

For tcsh 5.20.02 (and perhaps earlier), you can say %{<escape stuff>%}.
However, the following caveat (from the man page):

	Note that the enclosed escape sequence, should
	only be used to change terminal attributes and
	should not move the cursor location. Also, this
	cannot be the last character in the prompt
	string. (Available only if tcsh was compiled to
	be eight bit clean.)

For most uses, you don't need this, since tcsh's extended prompt format
allows you to do underlining, bolding, and standout modes in a portable
fashion.
--
Paul Close	     pdc@sgi.com	   ...!{ames, decwrl, uunet}!sgi!pdc

    Oh, no!  You walked into the slavering fangs of a lurking grue.