Sujet : bash prompt question
De : francois.patte (at) *nospam* mi.parisdescartes.fr (François Patte)
Groupes : comp.unix.shellDate : 19. Sep 2024, 11:34:55
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vcguof$hca7$1@dont-email.me>
User-Agent : Mozilla Thunderbird
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]\]\$ '
What I wanted by this :
specific color
user@hostthe 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