Mail Archives: cygwin/2001/07/03/19:46:02
I saw this too when I moved to rxvt. The problem is that when you
specify escape characters in your PS1 (primary prompt) bad things like
this happen. By default when you start up Cygwin, your PS1 is set to
show the current directory in your window title bar and your username
(possibly with host but I can't remember for certain) as your actual
prompt in green. Even in the standard Windows console-app window, I get
all sorts of problems when I have multi-screenline commands and start
doing Ctrl-a and Ctrl-e. I ended up living with it for a while, but
once I started using rxvt (which exploits the cr or cr/lf issue you
mention), my only choices were to
1. Remove all escape characters from PS1 and make my cwd be at the
beginning of my prompt. (Annoying since some paths can be quite long.)
2. Bite the bullet and build zsh, which is the shell I love anyway but
was otherwise too lazy to build in the past.
I chose a combination of the two. Zsh lets me have a right-side prompt,
so that my cwd shows up on the right while my machine-name shows up on
the left. If I start typing a command that requires a lot of space, the
right side prompt goes away for that line as soon as I touch it's first
character. Plus I could specify that I only want to see the last n
directories in my cwd (a feature that I loved in tcsh, but which would
be far more painful to produce in bash).
Ok, I don't want to start a "favorite-shell" war, so I'll stop now.
Bottom line: there is something wrong with the way...something renders
the characters in the window that's screwed up and has been for a while
(at least on my W2k machine).
-Sandeep
David A. Cobb wrote:
> This could be from any one of the following: rxvt, bash, readline,
> termcap(?), probably not in cygwin-winsup.
>
> I run bash in rxvt. When I type a long line it wraps; however the
> responsible program evidently sends only <CR>, not <CR><LF>. Therefore
> the cursor goes to position 1 in the line I was previously typing.
>
> If anyone tries this, it happened first when I was at the bottom of the
> screen; however, I think it happens wherever you are.
>
> I don't mind prowling in the sources, but I don't know which ones nor do
> I know what I'm looking for. And C is about 5th on my list of languages.
>
> David A. Cobb, Software Engineer, Public Access Advocate, All around
> nice guy.
> Get my PGP key at
>:<http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=superbiskit>
> Fingerprint=0x{6E3E_DB8C_2E8C_4248_62B2_FE29_08EE_CF0A_3629_E954}
>:<http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=superbiskit&fingerprint=on>
>
> "By God's Grace I am a Christian man, by my actions a great sinner."
> --The Way of a Pilgrim, R. M. French [tr.]
> Potentially Viral Software is any software for which you are not allowed
> to examine the source. Do not buy or use Potentially Viral Software!
> <---.----!----.----!----.----!----.----!----.----!----.----!----.---->
>
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting: http://cygwin.com/bugs.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>
--
---------------------------------------------
Sandeep V. Tamhankar
Member of Technical Staff
Tel: (408) 220-7505
Fax: (408) 774-2002
Email: sandman AT interwoven DOT com
Visit http://www.interwoven.com
Moving Business to the Web
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -