add command fallback and repo switch

1. Under some environment, ``import os`` may fail. To get rid of  the ugly error output, give a simple red prompt instead.

2. check environment variables to control the feature of powerline for repos.