From owner-freebsd-questions Mon May 13 08:33:42 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id IAA28531 for questions-outgoing; Mon, 13 May 1996 08:33:42 -0700 (PDT) Received: from mail.EUnet.hu (mail.eunet.hu [193.225.28.100]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id IAA28526 for ; Mon, 13 May 1996 08:33:30 -0700 (PDT) Received: by mail.EUnet.hu, id RAA23327; Mon, 13 May 1996 17:32:45 +0200 Received: by CoDe.CoDe.hu (RAA01236); Mon, 13 May 1996 17:32:54 GMT From: Gabor Zahemszky Message-Id: <199605131732.RAA01236@CoDe.CoDe.hu> Subject: Re: colored prompts in BASH To: Francisco.Reyes@i-2000.com Date: Mon, 13 May 1996 17:32:54 +0000 (GMT) Cc: freebsd-questions@freebsd.org In-Reply-To: <199605130347.XAA12617@i-2000.com> from "Francisco Reyes" at May 12, 96 11:46:11 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > At work there is one Linux computer and the bash shell there > has color prompts for different types of files. I have FreeBSD > at home and I would like to have colored prompts. Hm. For me, it looks like this is not one question, but two. 1) color prompt in bash: you have to send some special escape sequences in the prompt with which you can change colors on a terminal. On a vt100-compatible (with colors), it would be something that [27;34m the is an ESCAPE character (0x1b - I think), the [ is a [, and the two numbers are the foreground/background colours of the screen (or maybe the other direction). The m is an m. And yes, the ; is a ;. You have to look into a vtX programming guide to know what number is what colour. Or try to set the PS1 variable on the FreeBSD machine to the same, as in the Linux. (On Linux, echo "$PS1" and on FBSD: PS1="the-string-you-got-from-the-echo" ). 2) color prompts for different types of file: it looks, that you used the color-ls command (which is the default in Linux, as I know), this is a special type of the ls command, which is on ports/packages collection of fbsd, with some name like, color-ls. If it is not your problem, please try to tell to me: when did you get a prompt from your Linux/bash shell for filename? I think, the shell prompt is different from the ls list. (Waiter, I need a bottle of wine! Eg, a Gordon Bleu, or maybe a ham&eggs!) > I have searched in the Bash FAQ and did not find anything > regarding colored prompts. I tried the man pages also. And anything about prompts? > Is this a feature available to Linux only? Don't think so. > If this is a Linux feature would it be too difficult to introduce to > FreeBSD? No. I think somebody don't know the difference between prompt, and list. But! If I know it wrong, don't hesitate, but send me more info about your problem. At work there is a Linux machine with bash and color-ls, at home there is FreeBSD with original ls, so I could try to isolate your problem. -- Gabor Zahemszky -:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:- Earth is the cradle of human sense, but you can't stay in the cradle forever. Tsiolkovsky