bash prompt question

Liste des GroupesRevenir à cu shell 
Sujet : bash prompt question
De : francois.patte (at) *nospam* mi.parisdescartes.fr (François Patte)
Groupes : comp.unix.shell
Date : 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@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

Date Sujet#  Auteur
19 Sep 24 * bash prompt question21François Patte
19 Sep 24 +* Re: bash prompt question6Chris Elvidge
19 Sep 24 i+- Re: bash prompt question1François Patte
23 Sep 24 i`* Re: bash prompt question4Brian Patrie
23 Sep 24 i `* Re: bash prompt question3Geoff Clare
24 Sep 24 i  `* Re: bash prompt question2Brian Patrie
24 Sep 24 i   `- Re: bash prompt question1Geoff Clare
24 Sep 24 `* Re: bash prompt question14Damien Wyart
24 Sep 24  +* What? (Was: bash prompt question)9Kenny McCormack
24 Sep 24  i+* Re: What?5Damien Wyart
24 Sep 24  ii+- Re: What?1Axel Reichert
24 Sep 24  ii+- Re: What?1Kenny McCormack
24 Sep 24  ii+- Re: What?1Janis Papanagnou
25 Sep 24  ii`- Re: What?1Damien Wyart
25 Sep 24  i`* Re: What?3Damien Wyart
25 Sep 24  i +- Re: What?1Janis Papanagnou
25 Sep 24  i `- Re: What?1Damien Wyart
24 Sep 24  +- Re: bash prompt question1Kaz Kylheku
24 Sep 24  `* Re: bash prompt question3Kaz Kylheku
24 Sep 24   +- Re: bash prompt question1Kenny McCormack
25 Sep 24   `- Re: bash prompt question1Damien Wyart

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal