Re: turn off bash colored prompts for all users

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

 



On 8/2/2013 8:07 PM, Joe Zeff wrote:
> On 08/02/2013 05:00 PM, David wrote:
>> Well good then. You changed your system from the distroution defaults to
>> what you, personally, want. What works for you.
>>
>> Windows users do that. they set the default installed system to what
>> they want. MacOS users do that too. So all is good then?
> 
> I'd probably prefer it if the various alias scripts were called from
> ~/.bashrc with comments so that they could be commented out, but I'm not
> holding my breath.  As it is, I'm content with what I have, and it's
> easy to show others how to do it if they ask.  I'm not sure why color is
> the default, and I'd be astonished if anybody here knew, but I'm not
> about to waste time arguing the question because it's not important.


I have had this for 'my' prompt(s) for so long, probably around Red Hat 6.0.



COLOR1="\[\033[1;37m\]"

    [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="$COLOR1[\u] \w \\$ "




this makes my prompt show my name in bright white in [] as well as the
current directory


I use this one for 'root'



# Root prompt

COLOR1="\[\033[1;37m\]"
COLOR2="\[\033[1;31m\]"

PS1="$COLOR1[$COLOR2\u$COLOR1] \$PWD \\$ "



which shows 'root' in bright red but the rest in bright white.

These define the variables COLORx and use them in the prompt Something I
learned many, many years ago.

No magic involved. ANSI codes and defining Bash variables. Which is what
I assume they Fedora people, and others, do.

Have a good day.




-- 

  David
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux