[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A Suggestion On Bash

From: Sitaram Chamarty
Subject: Re: A Suggestion On Bash
Date: Sun, 8 Feb 2009 03:45:17 +0000 (UTC)
User-agent: slrn/0.9.9 (Linux)

On 2009-02-08, donglongchao <address@hidden> wrote:
> Dear Sir or Madam:    I have a wonderful idea about
> Bash(GNU bash version 3.2.39(1)-release
> (i486-pc-linux-gnu)).   
>         When I use tools like 'cat' or some other commands
>        like this,I find it hard to specify where the file

you probably mean 'identify' not 'specify'

>        that I 'cat' begins because the command I typed
>        just now was mixed with the file I want to read and
>        they look like the same.  
>         So I think if we could add special color such as
>        red or green to the command lines we typed before
>        to mark them,just like the different colors on
>        different kinds of files and catalogues,it will be
>        much easier for us to tell where the file we want
>        to read begins. 

'man bash' and read about PS1 (the primary bash prompt).
There are hundreds of ways to color output, used for all
sorts of things; a very recent example from my life is at
http://sitaramc.github.com/images/git-completion-plus.png --
every command line in that screenshot is colored in some

As an example, the PS1 I use is:

PS1='\[\e[32m\]\t\[\e30m\] \h:\W \$ \[\e[m\]'

reply via email to

[Prev in Thread] Current Thread [Next in Thread]