add PreSetEnv func; also for bash command completion.

Signed-off-by: kangliang.zkl <kangliang.zkl@alibaba-inc.com>