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 19160
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zzapper <david@xxxxxxxxxxxxxx>
- Subject: Re: list duplicate filenames which only vary by case
- Date: Fri, 26 Sep 2014 11:29:34 +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=aUEcuND45cicZfIau34z0Dh0+yRLZWMIrfyB7mSW/pE=; b=xQteQFT3Z8SQjur3xzoPC1g1yrO7RFlRxHw1Nfj49J6BHQX4jINSzGlQs5aoptxuta tNabm9g2I+e8rfPVnaSenT/1t5uLOAAJPNLVh/wFcSqlbUGg8cGTqhPEisHC+4pMA7aW hHX18ia27vFsJmBQ3oWC6on3jcMEF3lUs1Xamo56n2D90ePED7emeFpYlSVCM5Vd/qdv shY0bjoT4ymO4tUQUub8V7ysdWVY5fCsny/FIC1vAjcoKXGddvpcUPGPT0019EjcSJty x5gIkKpSjTD8qB3NhAx7PWW4YUdvNJ9qBSZ2/yHu1v89GuT4qAdVrimI+9FpL07MYbDl fsqw==
- In-reply-to: <CAHYJk3RSwz9E5GpVUnnUKaJoQddu5AsJEmDGh2dRmnd+bVfDVw@mail.gmail.com>
- 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>
On 26 September 2014 11:27, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> On 26 September 2014 11:11, zzapper <david@xxxxxxxxxxxxxx> 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.
Of course this also works.. duh :)
print -rl - *(e,'setopt nocaseglob; [[ -n $REPLY(#q[2]) ]]',)
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author