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

Re: Keeping a customized file from being updated during package upgrade

> > use colorized prompts.  Red is root, cyan is local user, purple is local
> > user with developer environment variables, green is remote, etc.  It
> > helps when you have as many different terminal sessions open at one time
> > as I do.
> Wow, how could you do that? Can you share your code with us?
> I use colored xterms to distinguish those -- easier to do. :-)

It's just a question of sticking some ANSI color codes into the prompt 
wherever it's defined.  The user prompt comes from /etc/bash.bashrc I think, 
and root's prompt from /root/.bashrc.  In my case, I never log onto the other 
boxes locally, so I didn't need to bother with any kind of cleverness to 
figure out whether I'm at the console or not, so remote boxes just have green 
prompts set up in /etc/bash.bashrc.  When I'm going to dedicate a terminal 
session to development work, I just source the devel environment script, and 
that changes the prompt as well as setting up CXXFLAGS and whatnot.

Michael McIntyre  ----   Silvan <dmmcintyr@users.sourceforge.net>
Linux fanatic, and certified Geek;  registered Linux user #243621

Reply to: