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://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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 |
Message-Id: | <5.2.0.9.2.20030131195520.028c25d0@pop3.cris.com> |
X-Sender: | rrschulz AT pop3 DOT cris DOT com |
Date: | Fri, 31 Jan 2003 20:01:12 -0800 |
To: | cygwin AT cygwin DOT com |
From: | Randall R Schulz <rrschulz AT cris DOT com> |
Subject: | Re: bash & $PS1 (display error) |
In-Reply-To: | <83040F98B407E6428FEC18AC720F5D73E501CB@exchange.tropicnetw |
orks.com> | |
Mime-Version: | 1.0 |
Rolf, Assuming some of your prompt is non-printing (escape sequences) offset those non-printing portions with \[backslash-escaped square brackets\]. That tells BASH (and / or the readline library it incorporates) not to count those portions for the purpose of wrapping the displayed input lines. Randall Schulz At 19:41 2003-01-31, Rolf Campbell wrote: >I've noticed several display problems with bash and prompts. Here's an >easy way to recreate one of them: > >(I've marked the lines to alleviate the wrapping problem) > >#line 1 >PS1='$PWD> ' >#line2 >mkdir -p >/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp >/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp >#line3 >cd >/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp >/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp > >When I run this (whether it be in rxvt or in the NT console) I get a >prompt that looks like this: >/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp >/tmp/tmp/tmp/tmp/tmp/tmp/tmp(#1) >/tmp(#2) >/tmp/tmp/tmp/tmp/tmp> > >I've marked the original new-lines. (#1) in a correct wrap that >occurred at the edge of my display. (#2) is an incorrect wrap that >happens for no obvious reason. > >This only seems to happen if the path is wider than the display. > >-Rolf Campbell -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |