Fix grep.zsh library

This PR merges 2 pull requests together:

- #3341: solves the `GREP_OPTIONS deprecated` message
- #3402: tidies up the part to exclude VCS folders and adds `.bzr` folder to the list of folders to ignore

Fixes #3341, fixes #3402, fixes #3028.
Closes #3343, closes #3382, closes #3388.