public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* Cygwin 1.7.x upgrade: Xterm history messes up prompt
@ 2010-01-14 16:11 Derek Greer
  2010-01-15 17:27 ` Derek Greer
  0 siblings, 1 reply; 3+ messages in thread
From: Derek Greer @ 2010-01-14 16:11 UTC (permalink / raw)
  To: cygwin-xfree


I just upgraded to the latest X11 bits yesterday and now when I pull up
command history (i.e. Esc + k,l keys), my prompt gets messed up.  For
example, if my prompt were as follows:

[ABCDEFG]: dgreer > 

... and I start going through the history of my commands, my command ends up
as follows:

[ABCDEFG]: dgls //somebox/somefolder


Has anyone else experienced this?  Seems like some bugs were introduced.
-- 
View this message in context: http://old.nabble.com/Cygwin-1.7.x-upgrade%3A-Xterm-history-messes-up-prompt-tp27163806p27163806.html
Sent from the cygwin-xfree mailing list archive at Nabble.com.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cygwin 1.7.x upgrade: Xterm history messes up prompt
  2010-01-14 16:11 Cygwin 1.7.x upgrade: Xterm history messes up prompt Derek Greer
@ 2010-01-15 17:27 ` Derek Greer
  2010-01-15 19:56   ` Andy Koppe
  0 siblings, 1 reply; 3+ messages in thread
From: Derek Greer @ 2010-01-15 17:27 UTC (permalink / raw)
  To: cygwin-xfree


I discovered that the problem is specific to my PS1 settings, but a bug
nevertheless.  The prompt I've used for years is:

PS1='\[\033]0;\w\007\033[32m\][\h]: \[\033[33m ${PWD##*/}\033[0m\] > '

This shows "[current machine] : current folder >" where the current machine
is greenish and the current folder is yellowish.  Something about the latest
version doesn't like the special characters that produce the colors anymore
... at least how I have them specified.
-- 
View this message in context: http://old.nabble.com/Cygwin-1.7.x-upgrade%3A-Xterm-history-messes-up-prompt-tp27163806p27180596.html
Sent from the cygwin-xfree mailing list archive at Nabble.com.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cygwin 1.7.x upgrade: Xterm history messes up prompt
  2010-01-15 17:27 ` Derek Greer
@ 2010-01-15 19:56   ` Andy Koppe
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Koppe @ 2010-01-15 19:56 UTC (permalink / raw)
  To: cygwin-xfree

2010/1/15 Derek Greer:
>
> I discovered that the problem is specific to my PS1 settings, but a bug
> nevertheless.  The prompt I've used for years is:
>
> PS1='\[\033]0;\w\007\033[32m\][\h]: \[\033[33m ${PWD##*/}\033[0m\] > '

Only non-printing must be enclosed in \[ ... \] , but you've got
${PWD##*/} in there as well. As a consequence, readline thinks the
prompt is shorter than it actually is.

Andy

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-15 19:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-14 16:11 Cygwin 1.7.x upgrade: Xterm history messes up prompt Derek Greer
2010-01-15 17:27 ` Derek Greer
2010-01-15 19:56   ` Andy Koppe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).