This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: what's wrong with my cygwin command prompt?


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@ACER-Nick
$ g++ testing.cpp -o testing

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


and what he was expecting to see:


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]