Date: Mon, 17 Apr 2000 11:26:27 -0600 (CST) From: Ryan Thompson <ryan@sasknow.com> To: "Eric J. Schwertfeger" <ejs@bfd.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: bash line wrapping with ANSI colours Message-ID: <Pine.BSF.4.21.0004171124030.67131-100000@ren.sasknow.com> In-Reply-To: <Pine.BSF.4.10.10004171020320.59955-100000@harlie.bfd.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Eric J. Schwertfeger wrote to Ryan Thompson: > On Mon, 17 Apr 2000, Ryan Thompson wrote: > > > I've recently begun mucking around with my bash prompts lately, and, due > > to the use of quite a lot of colour, PS1 has become quite long in > > characters (though, when displayed, is only about 15 columns, plus the > > path). > > put a \[ before and after the ANSI codes. Anything between them will not > get used to determine the length of the prompt, for word-wrapping > purposes. Ha! Thanks, Eric... Somehow that slipped by me. Actually, the end of the sequence should be marked with a \], not a \[. From the bash manpage: \[ begin a sequence of non-printing characters, which could be used to embed a terminal con- trol sequence into the prompt \] end a sequence of non-printing characters - Ryan -- Ryan Thompson <ryan@sasknow.com> Systems Administrator, Accounts Phone: +1 (306) 664-1161 SaskNow Technologies http://www.sasknow.com #106-380 3120 8th St E Saskatoon, SK S7H 0W2 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0004171124030.67131-100000>