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

Re: list all except



> What is the zsh way to select all files except
> those matching a regex?

For a regex, I don't know, but you can select the files that don't
match a glob pattern. The natural way is to follow the pattern with ~
and the pattern that represent the files you don't want.

Suppose you want to match all files except those matching *.pdf :
*~*.pdf

Suppose you want to match *.pdf except t*.pdf, just write
*.pdf~t*.pdf

And that's it.

-- 
J
"- Wakai ya na...
- Anata yori mo na !" -- Kunisaki Yukito



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