register env command.
Merge branch '4.0'