Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-Id: <5.1.0.14.2.20010703173802.02710e48@pop3.cris.com> X-Sender: rrschulz AT pop3 DOT cris DOT com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Tue, 03 Jul 2001 17:40:56 -0700 To: Sandeep Tamhankar , "David A. Cobb" From: Randall R Schulz Subject: Re: Trouble in RXVT with line wrap Cc: Cygwin General MailList In-Reply-To: <3B425069.6040200@Interwoven.com> References: <5 DOT 1 DOT 0 DOT 14 DOT 0 DOT 20010703173051 DOT 030d7a90 AT mail> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sandeep, That's overkill! Use the feature that's there to prevent this miscounting. Namely, \[ (that's backslash and left bracket, not escape) to open a non-printing sub-sequence of the promt and \] (likewise, bacslash right bracket) to close the non-printing sub-sequence. See section 7.10 of the BASH manual "Controlling the Prompt" (7.10 or thereabouts, i.e.--this is the section an old printed version I use). Randall Schulz At 16:08 2001-07-03, Sandeep Tamhankar wrote: >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 -- 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/