def METHOD_NAME(ctx, names: List[str], value_only: bool):  # noqa
    # Get all environment variables starting with 'OMV_'.
    env_vars = dict(filter(lambda item: item[0].startswith('OMV_'),
                           openmediavault.settings.Environment.as_dict().items()))
    # Check if we should display only given variables.
    if len(names) > 0:
        env_vars = dict(filter(lambda item: item[0] in names,
                               env_vars.items()))
        if len(env_vars) == 0:
            sys.exit(1)
    for key, value in natsort.humansorted(env_vars.items()):
        print(value if value_only else '{}={}'.format(key, value))
    sys.exit(0)