use case insted of matching in PATH cleaning
Merge pull request #2083 from wayneeseguin/bugfix/2083

fix getting regex error in zsh