Sujet : Re: bash prompt question
De : chris (at) *nospam* internal.net (Chris Elvidge)
Groupes : comp.unix.shellDate : 19. Sep 2024, 12:20:40
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vch1e9$i0sn$1@dont-email.me>
References : 1
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Lightning/5.4
On 19/09/2024 at 11:34, François Patte wrote:
Bonjour,
Wanting to personalize my bash prompt I wrote in my .bashrc file (with the help of "Learning the BASH shell"):
export PS1='\[\e[1;35m\]\u@\h -\d- ${text} \W\[\e[m]\]\$ '
try export PS1='\[\e[1;35m\]\u@\h -\d- ${text} \W\[\e[00m\]\$ '
where do you set $text?
What I wanted by this :
specific color
user@host
the date
wether I am on a local machine: nothing or on a remote one: ssh
and the directory
It works but not very well: if I use the up/down arrows to call back a previous command, the behaviour changes, sometimes as if I used the keys "Inser" or "Suppr" and at the end the usage becomes awfull.
What did I do wrong?
I hope to be understable in English language....
Thank you for helping.
François Patte
-- Chris Elvidge, EnglandI WILL NOT SELL MY KIDNEY ON eBAY