www.delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
content-class: | urn:content-classes:message |
Subject: | bash prompt problem - some more observations |
MIME-Version: | 1.0 |
Date: | Mon, 22 Aug 2005 17:50:02 +1000 |
Message-ID: | <3333F09C50966C499FD3A3E8FA4514C2334E2E@sydexchange1.vignette.com> |
From: | "Robinson, Mark" <Mark DOT Robinson AT vignette DOT com> |
To: | <cygwin AT cygwin DOT com> |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id j7M7m3AY008893 |
g'day I've been noodling around with the extra-character-bash-prompt-problem. It appears to manifest itself (for me at least) when I have title-bar info in my prompt, e.g. % PS1='\[\e]0;\u\a\]% ' % echo $BASH<tab> $BASH $BASH_COMMAND $BASH_SUBSHELL $BASH_ARGC $BASH_LINENO $BASH_VERSINFO $BASH_ARGV $BASH_SOURCE $BASH_VERSION % echo $BASHH What's more the tipping point seems to be at 8 characters: % PS1='\[\e]0;1234567\a\]% ' % echo $BASH<tab> $BASH $BASH_COMMAND $BASH_SUBSHELL $BASH_ARGC $BASH_LINENO $BASH_VERSINFO $BASH_ARGV $BASH_SOURCE $BASH_VERSION % echo $BASH vs % PS1='\[\e]0;12345678\a\]% ' % echo $BASH<tab> $BASH $BASH_COMMAND $BASH_SUBSHELL $BASH_ARGC $BASH_LINENO $BASH_VERSINFO $BASH_ARGV $BASH_SOURCE $BASH_VERSION % echo $BASHH My full prompt (in all its glory ;-) : [175] ~ ; PS1='\[\e]0;\u@\h:\w\a\e[1;34m\]: [\!] \W ; \[\e[0m\]' : [176] ~ ; echo $BASH<tab> $BASH $BASH_COMMAND $BASH_SUBSHELL $BASH_ARGC $BASH_LINENO $BASH_VERSINFO $BASH_ARGV $BASH_SOURCE $BASH_VERSION : [176] ~ ; echo $BASHASH And removing the title-bar cruft: : [176] ~ ; PS1='\[\e[1;34m\]: [\!] \W ; \[\e[0m\]' : [177] ~ ; echo $BASH<tab> $BASH $BASH_COMMAND $BASH_SUBSHELL $BASH_ARGC $BASH_LINENO $BASH_VERSINFO $BASH_ARGV $BASH_SOURCE $BASH_VERSION : [177] ~ ; echo $BASH Perfect! I'm hoping this might trigger some insight in the clever buggers that maintain bash/readline. Keep up the good work lads (and ladies)! later mark -- Mark Robinson Consultant Vignette Professional Services +61 2 9455 5317 In theory there is no difference between theory and practice. In practice there is. - Yogi Berra -- Vignette's software and expertise help organizations harness the power of information and the Web to deliver measurable improvements in business efficiency. Vignette is the efficiency expert. Visit http://www.vignette.com to learn more. -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |