support nested env

fixes https://github.com/grosser/wwtd/pull/2

@fromonesrc looking good ?