Sort environment by name