only use env's with =

copy of @Lupino with only the grep change.
should fix some of #45 cases