help-bash
[Top][All Lists]
Advanced

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

Re: Customize bash prompt


From: address@hidden
Subject: Re: Customize bash prompt
Date: Mon, 23 May 2022 19:13:41 +0200

On Mon, 23 May 2022 14:25:44 +0300
Yigit Akoymak <neotcities.yigit@gmail.com> wrote:

> *Greetings,*
> 
> I just installed a GNU/linux distro,Guix, in my virtualbox without X 
> server so there is only bash promt available , however I can't 
> understand how I can change color of the bash prompt for exmaple I want 
> $ sign to be green ,other text to red and background to blue.Also I read 
> the Bash refence manual at gnu.org no luck and surfed in forums on the 
> web that have diffrent aproache so it confused me a lot |¯\_(⊙︿⊙)_/¯.I 
> would be very happy if you forward me the documenatation or tutorial to me.|
> 
> 

Hi Yigit,

I played with

https://misc.flogisoft.com/bash/tip_colors_and_formatting

info and ended with these added lines in my .bashrc files:

..
..
# if root then rood else user/arne green:
if [ $UID  -eq  0 ]
then
echo -e '\033[?17;0;64c'
else
echo -e '\033[?17;0;44c'
fi
..
..


this gives a nice NON-blinking red prompt for root and a NON-blinking green 
prompt for me/users 

I really like it

(rood is red in Dutch language)

Have fun!

Arne




reply via email to

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