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

Exclusion on filename expansion



Using a variable, I cannot get ~ exclusion to work:

setopt extended_glob
mkdir foo
cd foo
touch abc def ghi jkl
ls *~abc~def
  ==> ghi jkl
pat="abc~def"
ls -d *~$pat
  ==> abc  def  ghi  jkl

I think that expansion of $pat is happening after globbing, so in this case
"*" expands to

abc def ghi jkl

without the application of the tilde exclusion.

Is there something I can do about this?

Thanks,
  Vin


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