public static function fromEnv($configFilename, Version $version)
    {
        if (null === $configFilename) {
            $configFilename = getenv('ZFILE') ? getenv('ZFILE') : 'z.yml';
        }

        return new self(
            $configFilename,
            new PathDefaultFileLocator('ZPATH', array(getcwd(), getenv('HOME') . '/.config/z')),
            new FileLoader(
                new PathDefaultFileLocator(
                    'ZPLUGINPATH',
                    array(ZPREFIX . '/vendor/zicht/z-plugins/', getcwd())
                ),
                $version
            )
        );
    }