X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; q=dns; s=default; b=lYU3S/h 04US9ZA6y9sYahC6aV0FjuxfrTBHy1AU2k1ib2M92IuU5saiUsiiiwqy7sB5U+uw sZFzIwKQ4Q1Q5Yi0HlQtXagadLR69FaK/A5fi8rwydzExhrLxFudvDixrFZdQ53R OnPJqKVbRszW62+FD/reXBQdUcFIvBdGmI+0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; s=default; bh=bGDCU8vZ6eCFJ omlOZAdOXGKE0w=; b=yCYBPK5v7Kjs4S4NtkvlCwJpLy1NhXkQ674KYVKxPCVqq jmPV0u0IBNUOzIai2Z37+85O/rpg0vgu8w9rNO6kJZN2biEmKcXXzyOQWAniuhUV tzyBh/JHfGa+uB7vWp2wl+HJw7rg6BHv51SltDxKWGQwyXTD9Ckcd09L73uBuY= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=cygwin-specific, cygwinspecific, shellopts, ps1 X-HELO: mail-it0-f51.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=cXenD6i+NKTVGSMzc0HVcln0hnrVg4oWahWAYdJHLAQ=; b=ChMukclF+BT70YJ1CBSLKaCWeWCh+24fT011zRAhmr0hg2NF+Rs05KfL3mWTjZ7bdB Ca4Ma+eU/6kt+8I98oyjU2NQZbrnAQRLxw/OUgPaaf7LVNsXZQXrDOUYQrKCKd3Xiw1S 2f4usX6U4pwGdcJND0nbQnoqqpNPZMz8Jen7erShXvvQEuLF1MIEHUGzRYF/o+f6ZwRU PPUnz5P8FGIAugEQJj1aQs4FQvEwpS6n0Bi5/Vy12tU33kLQISPq6fBe3fq95FbscP1d fB/bL2/tzXik87U9o7mfoDTZdFjmNmz02EBrwotG2b5AEnSOlMtUAKX1Wlvm74ewojn+ F3Uw== X-Gm-Message-State: AE9vXwN2ERkfEE1HULRzUj6wg+bNPDTQAwH3L+bGY0HQhOZHKVonCEtbFTLAHPi90qsuR0806jqUhDk5jnyV8w== X-Received: by 10.36.209.196 with SMTP id w187mr4729545itg.47.1472817160590; Fri, 02 Sep 2016 04:52:40 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <0294c48e-8e96-f554-3e05-6b7771dfb96e@redhat.com> References: <8980687a-967e-88d8-2a94-f485731fafe9 AT redhat DOT com> <9940d9b9cd565fbb0d5b395565197dfd AT xs4all DOT nl> <0294c48e-8e96-f554-3e05-6b7771dfb96e AT redhat DOT com> From: Gene Pavlovsky Date: Fri, 2 Sep 2016 14:52:40 +0300 Message-ID: Subject: Re: bash: igncr shell option breaks my PS1 prompt To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Dear Eric Blake, I understand there were issues with read handling of \r. But is the resulting solution/bugfix ideal? Or does it introduce new problems? Basically, I don't want to set `igncr` as system-wide shell option (e.g. through SHELLOPTS). I want to require scripts to use LF newlines - if there's a script somewhere with CRLF newlines, I want it to break immediately (which it would do by default, when igncr is disabled). Then I will notice and convert it's newlines (dos2unix) right away. So, how do I keep an existing bash script, that uses `read` piped from the output of a Windows console program that uses CRLF as newlines, working, without modifying the script? I don't see how it's possible with the current situation. Personally I think that by default read should behave as it did for years. Backwards compatibility 101... Add a new shell option (separate from igncr) if you'd like, but keep the default behavior same as it was for a long time. How do you think? Regards, Gene Pavlovsky On 30 August 2016 at 16:40, Eric Blake wrote: > On 08/30/2016 02:49 AM, Houder wrote: >> ... uhm ... what about the explanation in the help? >> >> -o option-name >> Set the variable corresponding to option-name: >> ... >> igncr on cygwin, ignore \r in line endings >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> >> ... this help message should be 'upgraded', should it not? > > Sure, I'll tweak that text, once I can find what about igncr is making > PS1 misbehave on \n. But help would be welcome, if anyone else is also > interested in looking into the cygwin-specific patches and actually > reviewing them. > > -- > Eric Blake eblake redhat com +1-919-301-3266 > Libvirt virtualization library http://libvirt.org > -- 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