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

Re: Exclusion on filename expansion



On Dec 7,  1:50pm, Vin Shelton wrote:
}
} pat="abc~def"
} ls -d *~$pat
}   ==> abc  def  ghi  jkl
} 
} I think that expansion of $pat is happening after globbing

No, but the expansion of $pat is not a pattern unless you make it one.

ls -d *~${~pat}

(the braces are optional in zsh default emulation, used here for clarity).



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