From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9136 invoked by alias); 2 Sep 2016 11:52:53 -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 9124 invoked by uid 89); 2 Sep 2016 11:52:52 -0000 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 Received: from mail-it0-f51.google.com (HELO mail-it0-f51.google.com) (209.85.214.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 02 Sep 2016 11:52:42 +0000 Received: by mail-it0-f51.google.com with SMTP id e124so31954150ith.0 for ; Fri, 02 Sep 2016 04:52:42 -0700 (PDT) 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 Received: by 10.79.116.26 with HTTP; Fri, 2 Sep 2016 04:52:40 -0700 (PDT) In-Reply-To: <0294c48e-8e96-f554-3e05-6b7771dfb96e@redhat.com> References: <8980687a-967e-88d8-2a94-f485731fafe9@redhat.com> <9940d9b9cd565fbb0d5b395565197dfd@xs4all.nl> <0294c48e-8e96-f554-3e05-6b7771dfb96e@redhat.com> From: Gene Pavlovsky Date: Fri, 02 Sep 2016 11:52:00 -0000 Message-ID: Subject: Re: bash: igncr shell option breaks my PS1 prompt To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00023.txt.bz2 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