Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: list duplicate filenames which only vary by case
- X-seq: zsh-users 19164
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zzapper <david@xxxxxxxxxxxxxx>
- Subject: Re: list duplicate filenames which only vary by case
- Date: Fri, 26 Sep 2014 14:30:17 +0200
- Cc: Zsh Users <zsh-users@xxxxxxx>
- 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=P5NsUwWu5IRnzQ28O8KBlz9G1HBu3iimGTPV15HihRs=; b=G+7gfoBMBgCaEB0LqZ2A6PUdal6WYRQihqaWfa9vR3OI9VuP3kjVOP29BLSKWDXA8n +n6GwDubA2g6/DIy9+JcY4FABHjL0wyyMxo8SaUENRtepFySp+m3Wfpe/nO83QWqVVzZ yj9QZnjoPkkKFXWIxDrg/M5Ihkaeq/1MRdq29JdIw6OCltKU2NNUE9/LjLt/34geXCeD PWv687zrF3x+2TWvaSHDwJ9cnKaxRDiQIljPSuqCXKKNyJdCqVVPt+IZfM6zYDIlOumX ipDzOvkxdu09HZe1PAZ8xZOk5Pg3n0oJeMXEFdAi5oOCaMiYmJooeSJMl2JQIeWHtMSr oZJQ==
- In-reply-to: <XnsA3B48566D6FAFdavidrayninfocouk@80.91.229.13>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <XnsA3B46798CE2D3davidrayninfocouk@80.91.229.13> <CAHYJk3RSwz9E5GpVUnnUKaJoQddu5AsJEmDGh2dRmnd+bVfDVw@mail.gmail.com> <CAHYJk3T5RVCKhnsGMJtCLaQWLTkKQCLt1_32gU3gP-j0Pi-OeQ@mail.gmail.com> <20140926104037.2ec132df@pwslap01u.europe.root.pri> <XnsA3B48566D6FAFdavidrayninfocouk@80.91.229.13>
On 26 September 2014 14:06, zzapper <david@xxxxxxxxxxxxxx> 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.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author