From: Alex Rezinsky <alexr@aurora.sps.mot.com>
To: "Jose I. Cabrera" <cabrera@wrc.xerox.com>
Cc: gnu-win32@cygnus.com
Subject: Re: Colors.....
Date: Wed, 09 Sep 1998 19:41:00 -0000 [thread overview]
Message-ID: <35F68310.9630D97D@aurora.sps.mot.com> (raw)
In-Reply-To: <35F53DD1.E246F3C@wrc.xerox.com>
Hi,
This is fragment from my .bashrc file where I set colors for each prompt
depending on exit status of the previous command.
Hope this will help.
Alex Rezinsky
Motorola Semiconductor Israel
alexr@msil.sps.mot.com
-------------------------------
# Colors
export fg_black="^[[30m"
export fg_red="^[[31m"
export fg_green="^[[32m"
export fg_yellow="^[[33m"
export fg_blue="^[[34m"
export fg_magenta="^[[35m"
export fg_cyan="^[[36m"
export fg_white="^[[37m"
export bg_black="^[[40m"
export bg_red="^[[41m"
export bg_green="^[[42m"
export bg_yellow="^[[43m"
export bg_blue="^[[44m"
export bg_magenta="^[[45m"
export bg_cyan="^[[46m"
export bg_white="^[[47m"
export normal="^[[0m"
set_promtp_colors()
{
if (( $? ))
then
prompt_beg=${bg_red}${fg_yellow}
prompt_end=${normal}
else
prompt_beg=${bg_blue}${fg_yellow}
prompt_end=${normal}
fi
}
PROMPT_COMMAND=set_promtp_colors
PS1=' \[${prompt_beg}\]<\!>\[${prompt_end}\] '
Jose I. Cabrera wrote:
> Does anyone knows how to put colors on the bash screen? I have a nice
> utility called NTSh and it has great colors. Anyone?
>
> thanks.
> jose
> -
> For help on using this list (especially unsubscribing), send a message to
> "gnu-win32-request@cygnus.com" with one line of text: "help".
>
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
next prev parent reply other threads:[~1998-09-09 19:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-09-07 4:10 Installshield lro
1998-09-08 7:53 ` Colors Jose I. Cabrera
1998-09-09 19:41 ` Alex Rezinsky [this message]
1998-09-10 2:15 ` Colors Jose I. Cabrera
1998-10-08 8:26 ` tcsh Jose I. Cabrera
1998-10-09 2:33 ` tcsh Corinna Vinschen
1998-10-10 7:18 ` tcsh Michael Hirmke
1998-10-10 13:36 ` tcsh Corinna Vinschen
1998-11-25 12:51 ` bash scripts and cd's Jose I. Cabrera
1998-09-09 19:41 ` Colors Michael Weiser
1998-09-09 2:55 Colors Kevin F. Quinn
1998-09-09 6:59 Colors 조재철
1998-09-10 21:27 ` Colors Michael Hirmke
1998-09-10 2:57 Colors lro
1998-09-11 0:15 Colors Sergey Okhapkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=35F68310.9630D97D@aurora.sps.mot.com \
--to=alexr@aurora.sps.mot.com \
--cc=cabrera@wrc.xerox.com \
--cc=gnu-win32@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).