From owner-freebsd-questions Sun Oct 7 18:48:32 2001 Delivered-To: freebsd-questions@freebsd.org Received: from hotmail.com (f4.law11.hotmail.com [64.4.17.4]) by hub.freebsd.org (Postfix) with ESMTP id 07ACA37B409 for ; Sun, 7 Oct 2001 18:48:29 -0700 (PDT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sun, 7 Oct 2001 18:48:28 -0700 Received: from 24.116.152.150 by lw11fd.law11.hotmail.msn.com with HTTP; Mon, 08 Oct 2001 01:48:28 GMT X-Originating-IP: [24.116.152.150] From: "Charles Burns" To: questions@freebsd.org Subject: Color BASH prompt question Date: Sun, 07 Oct 2001 18:48:28 -0700 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 08 Oct 2001 01:48:28.0880 (UTC) FILETIME=[53E00500:01C14F9B] Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG When using ANSI color codes to color the BASh prompt ("^[[1;37m", for example), BASh seems to think that the codes are actual displayed characters and shortens the # of characters that can be typed into the first line of the command prompt accordingly. For example, with no color codes at 80x25, you can type a number of characters equal to 80 minus the # of characters in the prompt. A prompt of: "bash-2.05# " for example would allow typing of 69 characters without BASH putting further characters on the next line. With several color code sequences, this makes commands trail off after typing about 10 characters, which is very irritating. A solution would be to have a 2-line command prompt, but that would be ... wrong somehow. Any solutions to this would be appreciated... Not a critically important problem, but I know of several people annoyed by this. I could probably have BASh return to the beginning of the line, then add a # of non-destructive spaces equal to the real prompt length, but having an esoteric shell script just to have a color prompt seems silly. Thnks ahead of time _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message