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

Re: list duplicate filenames which only vary by case



On Fri, 26 Sep 2014 11:29:34 +0200
Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> Of course this also works.. duh :)
> print -rl - *(e,'setopt nocaseglob; [[ -n $REPLY(#q[2]) ]]',)

That's neat, but the option setting leaks out...

print -rl - *(e,'() { setopt localoptions nocaseglob; [[ -n $REPLY(#q[2]) ]] }',)

or (tcm = test case match)

tcm() {
  setopt localoptions nocaseglob
  [[ -n $REPLY(#q[2]) ]]
}
print -rl - *(+tcm)

pws



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