From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8247 invoked by alias); 5 Apr 2017 16:53:38 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 8228 invoked by uid 89); 5 Apr 2017 16:53:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=H*x:Mailer, H*UA:Mailer, HX-Originating-Client:sk:open-xc, HImportance:Medium X-HELO: mo4-p05-ob.smtp.rzone.de Received: from mo4-p05-ob.smtp.rzone.de (HELO mo4-p05-ob.smtp.rzone.de) (81.169.146.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Apr 2017 16:53:36 +0000 X-RZG-AUTH: :KH5KeA6gNfmPwxG/SGu3pkirqXcxhUh5Ga4aJOYUFK8qszW2V+k1Q+Swjg6xyFWlM90aW7J5ipH2 X-RZG-CLASS-ID: mo05 Received: from oxapp04-03.back.ox.d0m.de (com4.strato.de [81.169.145.237]) by smtp-ox.front (RZmta 40.4 AUTH) with ESMTPSA id 90a2d7t35GrXCiR (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate) for ; Wed, 5 Apr 2017 18:53:33 +0200 (CEST) Date: Wed, 05 Apr 2017 16:53:00 -0000 From: =?UTF-8?Q?=22=5C=22=5B=5B=5C=22Dr=2E_Matthias_H=2E_Fr=C3=B6hlich=22?= To: cygwin@cygwin.com Message-ID: <1661013492.3298.1491411213549@communicator.strato.com> Subject: Why does default shell prompt PS1 contain newlines (\n)? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Originating-Client: open-xchange-appsuite X-SW-Source: 2017-04/txt/msg00073.txt.bz2 After installing "plain vanilla" cygwin I noticed, that default definition of PS1 from /etc/bash.bashrc contains newline characters '\n': # Set a default prompt of: user@host and current_directory PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ ' This does immediately lead to the strange effect, that shell (bash) in interactive terminal window (C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico -) always advances 2 lines on every single CR. This definition seems to be around pretty long already, as it is mentioned in several discussions on superuser &c. There is probably a very good reason for this - however, I could not figure out on my own, neither found any rationale in FAQ. Would be grateful for short explanation - thanks in advance. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple