Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <048601c58582$58876c80$6508a8c0@chimaera> From: "Max Bowsher" To: "Cygwin" Subject: bash 3.0-7 bug - prompt length with non-printing characters Date: Sun, 10 Jul 2005 20:05:32 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-IsSubscribed: yes I have a prompt ($PS1) which includes non-printing characters. They are enclosed with \[ .... \] so that bash knows not to count them in discovering the length of the prompt in order to position the cursor correctly. On upgrading to bash 3, I noticed that the last few characters of my prompt were erroneously duplicated (it ended with two $ signs). When tab completion was used, the text got nastlily corrupted. Here is a reproduction case: PS1='\[\e[32;1m\]@\[\e[33;1m\]#\[\e[0m\] $ ' Curiously, appending '\[\]' to the end of $PS1 works around the problem. Max. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/