Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: list duplicate filenames which only vary by case



Mikael Magnusson <mikachu@xxxxxxxxx> wrote in news:CAHYJk3SVAvgCjeUy=
6MGD7sPBdBH56R7zExN5qo0km0p2eRW=g@xxxxxxxxxxxxxx:

> 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.
> 

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




Messages sorted by: Reverse Date, Date, Thread, Author