Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For a long time now, I have wanted all command line utilities to consider options --exclude <regex> and --include <regex> options, where the regex refers to paths. This is applied before they do any displaying or evaluation.

So much more convenient than xargs.



You can get something similar with shell globs, and ~not in zsh. e.g. *~*.c(.) to exclude all .c files (and only list files, not directories or anything else).

Looks a bit obscure at a glance due to lack of spaces, but it's not that different from -exclude or "| grep -v".


À la powershell’s Get-ChildItems!

It’s a good point, as the shell glob syntax is too limited.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: