From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15295 invoked by alias); 27 Sep 2014 11:02:02 -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: 19172 Received: (qmail 28248 invoked from network); 27 Sep 2014 11:01:44 -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=-1.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_NUMERIC_HELO,SPF_HELO_PASS,T_FSL_HELO_BARE_IP_2 autolearn=no version=3.3.2 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@zsh.org From: zzapper Subject: Re: list duplicate filenames which only vary by case Date: Sat, 27 Sep 2014 11:01:28 +0000 (UTC) Organization: Your Company Message-ID: References: <20140926104037.2ec132df@pwslap01u.europe.root.pri> X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 2.30.59.251 User-Agent: Xnews/2009.05.01 X-Antivirus: avast! (VPS 140927-0, 09/27/2014), Outbound message X-Antivirus-Status: Clean Mikael Magnusson wrote in news:CAHYJk3SVAvgCjeUy= 6MGD7sPBdBH56R7zExN5qo0km0p2eRW=g@mail.gmail.com: > On 26 September 2014 14:06, zzapper wrote: >> >> your solutions do not work!? >> >> They list all of the above files instead of just house.* > > If you use a zsh from ten years ago, you don't have anonymous > functions, you also cannot use globbing inside [[ ]]. > tcm() { > setopt localoptions nocaseglob > local a > a=( $REPLY([2]N) ) > [[ -n $a ]] > } > *(+tcm) > > this should work in ancient zsh versions too, probably. If not, should > only need minor modifications. > MM Your variation of the PWS's tcm is the only thing that works for me on any version of zsh. thanks -- zzapper https://twitter.com/dailyzshtip --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com