delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/11/21/13:19:56

X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: what's wrong with my cygwin command prompt?
Date: Tue, 21 Nov 2006 18:19:21 -0000
Message-ID: <00ea01c70d99$90b7f200$a501a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <1164131879.4393.2.camel@mercury.sprymusic>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

On 21 November 2006 17:58, Jean-Claude Gervais wrote:

> Hi,
> 
> 	We've noticed this on a number of computers we are using.

  I should hope so.  What the OP is described is the completely ordinary
bog-standard behaviour of bash.

> 	To get your prompt behaving normally again, hit CTRL+C in the shell
> window.

  The prompt already was behaving normally.

> 	It seems like if the CTRL attribute gets stuck 'on' for some reason,
> and CTRL+C toggles it back off.
> 
> 	Try it.
> 
> 	As for what is causing it, no idea, but at least you have a way of
> dealing with it.
> 
> 	I hope this helps.

  No, you have just made the issue more confusing.  Look again at what the OP
was seeing:


Nick AT ACER-Nick
$ g++ testing.cpp -o testing

Nick AT ACER-Nick
$ ./testing
Hello, i'm newbie to this forum.


and what he was expecting to see:


Nick AT ACER-Nick
$ g++ testing.cpp -o testing
$ testing



  First off, I don't see how you would expect the "\u@\h" to only be printed
once.  That's part of the prompt and it's printed every time.

  Second, the blank line between the end of one command and the prompt for
another is casued by the \n in the prompt string.

  IOW, the shell is behaving as if the prompt string was defined as

PS1="\n\u@\h\n$ "

  For the OP to get the desired result, he should add a command to .bashrc or
one of the other startup scripts along the general lines of

export PS1="$ "



    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


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