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

Re: list duplicate filenames which only vary by case



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