From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1528 invoked from network); 16 Oct 2005 07:51:24 -0000 Received: from ns2.primenet.com.au (HELO primenet.com.au) (?ZgcnCIXFaxDDwQg2tivvd/FCzrreSO6i?@203.24.36.3) by ns1.primenet.com.au with (DHE-RSA-AES256-SHA encrypted) SMTP; 16 Oct 2005 07:51:24 -0000 Received: (qmail 20119 invoked from network); 15 Oct 2005 18:04:03 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by proxy.melb.primenet.com.au with SMTP; 15 Oct 2005 18:04:03 -0000 Received: (qmail 12279 invoked from network); 15 Oct 2005 18:02:55 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 15 Oct 2005 18:02:55 -0000 Received: (qmail 17361 invoked by alias); 15 Oct 2005 18:02:47 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9502 Received: (qmail 17352 invoked from network); 15 Oct 2005 18:02:47 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 15 Oct 2005 18:02:47 -0000 Received: (qmail 11168 invoked from network); 15 Oct 2005 18:02:47 -0000 Received: from vms040pub.verizon.net (206.46.252.40) by a.mx.sunsite.dk with SMTP; 15 Oct 2005 18:02:45 -0000 Received: from candle.brasslantern.com ([71.116.81.225]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IOE00LPAY4JLAI0@vms040.mailsrvcs.net> for zsh-users@sunsite.dk; Sat, 15 Oct 2005 13:02:44 -0500 (CDT) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id j9FI2fqs022902; Sat, 15 Oct 2005 11:02:42 -0700 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j9FI2fFo022901; Sat, 15 Oct 2005 11:02:41 -0700 Date: Sat, 15 Oct 2005 18:02:40 +0000 From: Bart Schaefer Subject: Re: Superfluous CRs trouble completion routines in Cygwin In-reply-to: <87irvzys44.fsf@trews52.bothi.fi> To: Hannu Koivisto , "Zsh Users' List" Message-id: <1051015180240.ZM22900@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii References: <87irvzys44.fsf@trews52.bothi.fi> Comments: In reply to Hannu Koivisto "Superfluous CRs trouble completion routines in Cygwin" (Oct 15, 1:47pm) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 On Oct 15, 1:47pm, Hannu Koivisto wrote: } } [...] when I added hline[-1]=${hline[-1]%^M} } to the loop } } _perforce_call_p4 help-commands help commands | while read -A hline; do } ... } done } } the problem disappeared. The underlying issue here is the one discussed in the thread "Little problem while converting from bash" back on May 12 (e.g. users/8822). There was also a lengthy thread "zsh and line breaks" in April 2004 on the zsh-workers list which partly explains how we got to where we are now. } I wonder if it made sense to make the "core" completion functions } such as _describe more tolerant to CRs instead of modifying } application-specific completion functions? Or can you think of other, } better ways of getting rid of the problem for good? I think the answer is that $_comp_setup in compinit should contain local IFS=$'\r'"$IFS" The question is whether it would hurt to treat CR as whitespace in completion on other platforms -- if it would, then we need to make that conditional on Cygwin, somehow.