From owner-freebsd-questions Mon Apr 17 10:10:51 2000 Delivered-To: freebsd-questions@freebsd.org Received: from ren.sasknow.com (ren.sasknow.com [207.195.92.131]) by hub.freebsd.org (Postfix) with ESMTP id 731F437BA09 for ; Mon, 17 Apr 2000 10:10:48 -0700 (PDT) (envelope-from ryan@sasknow.com) Received: from localhost (ryan@localhost) by ren.sasknow.com (8.9.3/8.9.3) with ESMTP id LAA67457 for ; Mon, 17 Apr 2000 11:11:32 -0600 (CST) (envelope-from ryan@sasknow.com) Date: Mon, 17 Apr 2000 11:11:31 -0600 (CST) From: Ryan Thompson To: freebsd-questions@freebsd.org Subject: bash line wrapping with ANSI colours Message-ID: Organization: SaskNow Technologies [www.sasknow.com] MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi all, 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). For some reason, with line editing enabled in bash, readline insists on WRAPPING lines of text after I type only a few characters (my prompt happens to be about 70 characters long, and I'm using a terminal with 80 columns)... Thus, after I type about 10 characters at the prompt (still only on about terminal column 30), it wraps and messes with the display. Thus, it looks like bash figures out the wrapping boundary WITHOUT first filtering out the ANSI escape sequences. Granted, the terminal is responsible for interpreting the ANSI codes, but is there a way to make bash ignore them before handling wrapping? The wrapping doesn't happen if I use `set +o emacs` (thus turning off readline in bash), but I don't want to lose the command line editing. It DOES still happen with -o vi, though. Has this been documented before? I couldn't find anything in the bash manpage or the mailing lists like this. It smells like a bug, but has probably been around far too long to be called anything but a feature :-) -- Ryan Thompson 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