From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25504 invoked by alias); 26 Sep 2013 17:48:03 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18003 Received: (qmail 23149 invoked from network); 26 Sep 2013 17:47:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.216.169 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=67SlOYRoSJ3I7a8qMa6UQXu0ZmIp4EShDiSPHAxkOyU=; b=SujgSGCuPNqNqrDUX0o79Gz3DISzlkz1uwZid9Y1bqk06LJohuNkouVKDQK6K4K/4F tt5Z30y/kx+H6taiqNg28ejyD7Yn9cy6Jn/ZNszjp8ZjMZxn9/hnTMIS01+eOYIujp0o s+MbUoG/X0DODqCxl5jIXMxW8K/H1H0upwrJhf5JYhMTzC+/IA2K7qHOv/kJ0nYJWZoT 8sOSGZprluYmBj0VRdlfWi/A3+Wej0rhNDE4+pP8OBux83IeAF60kPn4DOvTZK2yhLec XXx2xJY10v4GQST8kT7TJqG7R55peyi3yHugYcolilpyAseJbKv7iNUsL9/+03xM+v4d Zd2g== MIME-Version: 1.0 X-Received: by 10.224.20.72 with SMTP id e8mr8162565qab.49.1380217671452; Thu, 26 Sep 2013 10:47:51 -0700 (PDT) In-Reply-To: <130926101254.ZM23201@torch.brasslantern.com> References: <20130918185058.GA19235@Archie> <20130918211227.51cdbd0f@pws-pc.ntlworld.com> <130926101254.ZM23201@torch.brasslantern.com> Date: Thu, 26 Sep 2013 23:17:51 +0530 Message-ID: Subject: Re: Issue with histreduceblanks From: Raghavendra Prabhu To: Bart Schaefer Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 On Thu, Sep 26, 2013 at 10:42 PM, Bart Schaefer wrote: > On Sep 26, 12:52am, Raghavendra Prabhu wrote: > } > } On Thu, Sep 19, 2013 at 1:42 AM, Peter Stephenson > } wrote: > } > > } > Are there any non-ASCII characters on the line that might be confusing > } > the algorithm (the option pre-dates handling of multibyte characters)? > } > } Sorry for the delay in replying (it had ended in my Junk due to > } Precedence headers). > > You didn't really answer Peter's question. Also I think something is > being lost in the cut-and-paste-and-email process, because this .. Ah, sorry for not replying on that earlier, there are no non-ASCII characters there, the line is just "Only two kinds of witnesses exist. The first live in a neighborhood where". . > > } Archie% Only two kinds of witnesses exist. The first live in a > } neighborhood where > } zsh: command not found: Only > > ... obviously has a newline where there must not have been one in your > original string. There is no newline there, it was just that the line was wrapped in the mail. >To have much hope of debugging this, we need a copy > of EXACTLY what you typed, including what might be characters that > "look like" spaces but really are not. > > } b) Also tested with print as requested > > Did you see/try this? Yes. Tested with different combinations: ================== zsh -f Archie% setopt histreduceblanks Archie% Only two kinds of witnesses exist. The first live in a neighborhood where zsh: command not found: Only Archie% Only two kinds of witnesses exist. he fisst lvee in a neighorrhood werre Archie% print Only two kinds of witnesses exist. he fisst lvee in a neighorrhood werre !#:7 !#:8 !#:9 print Only two kinds of witnesses exist. he fisst lvee in a neighorrhood werre he fisst lvee Only two kinds of witnesses exist. he fisst lvee in a neighorrhood werre he fisst lvee Archie% print Only two kinds of witnesses exist. he fisst leee in a neighrrrhood werre he fisst veee Archie% print Only two kinds of witnesses exist. The first live in a neighborhood where !#:7 !#:8 !#:9 print Only two kinds of witnesses exist. The first live in a neighborhood where The first live Only two kinds of witnesses exist. The first live in a neighborhood where The first live Archie% print Only two kinds of witnesses exist. he fisst lvee in a neighorrhood whrre he fisst ivee Archie% ======================== > >> If that were the case, I would expect history ops that reference words by >> position would also be confused. E.g., something like >> >> zsh% print Only two kinds of witnesses exist. The first live in a neighborhood where !#:7 !#:8 !#:9 >> >> would likely substitute the wrong substrings for !#:7 etc., because the >> same array of word positions is used to condense blanks. >