delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/04/23/11:13:26

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
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Fri, 23 Apr 2004 11:13:05 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Ashok Vadekar <avadekar AT certicom DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Line breaks in bash
In-Reply-To: <20040423124355.GA29327@certicom.com>
Message-ID: <Pine.GSO.4.56.0404231106170.16306@slinky.cs.nyu.edu>
References: <c69h99$uh2$1 AT sea DOT gmane DOT org> <20040423003718 DOT 93970 DOT qmail AT web21205 DOT mail DOT yahoo DOT com> <20040423124355 DOT GA29327 AT certicom DOT com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

Which OS?  Win9x console is pretty much braindead.  Cygwin's programs
(notably bash) have code for processing a SIGWINCH, which they should
receive whenever a window (console or otherwise) that they're running in
gets resized.  However, the code for sending this signal will only detect
a *window* resize -- I don't know whether the one via "mode.com" will also
be detected[*].  Try "kill"ing bash with SIGWINCH.  Also, bash doesn't use
the COLUMNS/ROWS variables, it looks at the same info that stty gets --
run "stty -a" and see if it picks up the window size.
	Igor
[*] It is on Win2k, FWIW.

On Fri, 23 Apr 2004, Ashok Vadekar wrote:

> I get the behaviour even if I comment out all the complex PS1
> definitions in /etc/profile.  To see it, open a bash (windows console, I
> don't know about rxvt) and resize it to be larger than the 80x25
> (mode.com con lines=50 cols=120). Then type away (at a prompt) and see
> that the text will wrap at ~80 characters. Now, export COLUMNS=120.
> Same problem.  Now, launch another bash from this console, and resize it
> to 120 wide.  Finally, it does the right thing.
>
> So, it seems that COLUMNS needs to match the width of the screen, AND
> something else that only happens (by default anyways) when a new bash is
> started.  Maybe someone else knows what that might be?
>
> On Thu, Apr 22, 2004 at 05:37:18PM -0700, AJ Reins wrote:
> > --- Andrew DeFaria wrote:
> > > When I type a long line in the bash shell it seems to get confused
> > > when it passes the first 80 character barrier and does a newline.
> > > Below is an example.
> > >
> > > C09-272-A:# why is it in bash that when I get close to typing 80
> > > characters bash
> > >  does som
> > > ething like this?
> > >
> > > Now set my prompt to the hostname as
> > > "\[\e]0;\w\a\e[01;33mC09-272-A:\e[0m". Could this be causing the problem?
> >
> > Yes. You have a \[ to indicate non-printing characters without the
> > closing \].
> >
> > > --
> > > I don't suffer from insanity. I enjoy every minute of it.
> > Me too! (sorry about that! (acutally I'm not, but lets not quibble
> > over tribbles!))

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019