This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: $PS1 doesn't appear to work the same after version 1.7
- From: Andy Koppe <andy dot koppe at gmail dot com>
- To: lynn at swcp dot com, cygwin at cygwin dot com
- Date: Mon, 3 May 2010 19:38:17 +0100
- Subject: Re: $PS1 doesn't appear to work the same after version 1.7
- References: <twig.1272906926.48547@swcp.com>
lynn wrote:
> I use the following to setup my $PS1 bash prompt:
>
> PS1="\[\033]0;\w\007\033[32m\]\u@\h\[\033[36m \W\033[0m\]> "
>
> This attempts to emit the username@hostname current_folder> Â(in color)
You've got the \W and the space before it inside \[...\] which tells
readline not to count it towards the length of the prompt. Confusion
ensues.
Andy
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple