Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Chris Elvidge Newsgroups: comp.unix.shell Subject: Re: bash prompt question Date: Thu, 19 Sep 2024 12:20:40 +0100 Organization: A noiseless patient Spider Lines: 38 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Thu, 19 Sep 2024 13:20:41 +0200 (CEST) Injection-Info: dont-email.me; posting-host="d05c223c85d5b0f20392d0464f4b2250"; logging-data="590743"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19FykIHB3lTF0A9BvPo2N/3tf7uh6l0o2g=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Lightning/5.4 Cancel-Lock: sha1:eczCv/W7ldx9CRcFNiopwIo4Vkw= In-Reply-To: Content-Language: en-GB Bytes: 2017 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, England I WILL NOT SELL MY KIDNEY ON eBAY