From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2705 invoked by alias); 26 Sep 2014 09:27:38 -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: 19159 Received: (qmail 22582 invoked from network); 26 Sep 2014 09:27:37 -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 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=RRwp7HQz+jRSV2bNQNa00zrQTzfPkaEORcm4UZZqHTY=; b=ksCp3CagcBpIEbQQCbNM/0CVZHa1FHL33wnysmSAs6+D/WNVMx2XfvFu5bt8j7S0SI cSPGz7S/EEyxgf/mz9F1SK7KuHssfFO2uD6E86tx1rO0QERwapJSyGgXJSjeVIU8tmuQ Bau/7kOk/lo3C9Tn9TvhwdENbAf+42puN5um6LjgawM/FWW7huG+bZL2Ay8Xa2+4E6iy m246Tw+/DsBfqelnjX+moR2pLOmBkDg7RtUJvqZznwX4NE9B0W5vaPKFqrOB6R4A63EZ RL9K1Mj3DcJrfpllVhO/ezieFLl6MFKZkHuTbzi/Va6PpNG62C0fpnWG3phtfq/zadFU K3Bw== MIME-Version: 1.0 X-Received: by 10.42.43.7 with SMTP id v7mr1069881ice.88.1411723650333; Fri, 26 Sep 2014 02:27:30 -0700 (PDT) In-Reply-To: References: Date: Fri, 26 Sep 2014 11:27:30 +0200 Message-ID: Subject: Re: list duplicate filenames which only vary by case From: Mikael Magnusson To: zzapper Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 On 26 September 2014 11:11, zzapper wrote: > Hi > > list files with duplicates in same directory > e.g. > house.jpg House.jpg hOUSE.jpg > > I guess it needs a e[$REPLY...] clause () { setopt localoptions nocaseglob; print -rl - *(e,'[[ -n $REPLY(#q[2]) ]]',) } I couldn't figure out any syntactically valid way to insert (#i) in the glob. If that were possible you wouldn't need the function and local option. -- Mikael Magnusson