# Path: aeriscloud/cli/helpers.py
# class Command(click.Command):
#     # This is inherited by the Context to switch between pure POSIX and
#     # argparse-like argument parsing. Setting it to false will push any
#     # unknown flag to the argument located where the flag was declared
#     allow_interspersed_args = config.get('config', 'posix', default=False)
# 
#     def __init__(self, *args, **kwargs):
#         cs = dict(help_option_names=['-h', '--help'])
#         super(Command, self).__init__(context_settings=cs,
#                                       *args, **kwargs)
# 
# Path: aeriscloud/config.py
# def module_path():
#     def __init__(self):
#     def load(self):
#     def has(self, section, option):
#     def get(self, section, option, **kwargs):
#     def set(self, section, option, value):
#     def unset(self, section, option):
#     def save(self):
#     def dump(self):
#     def complete(self):
# def inventory_path():
# def config_dir():
# def data_dir():
# def config_ini_path():
# def projects_path():
# def basebox_bucket():
# def default_organization():
# def expose_username():
# def expose_url():
# def has_github_integration():
# def verbosity(val=None):
# class Config(object):


import click
import sys
from aeriscloud.cli.helpers import Command
from aeriscloud.config import config
#!/usr/bin/env python




def _display_option(section, option, value):
    if sys.stdout.isatty():
        click.echo('%s.%s = %s' % (
            click.style(section, fg='blue'),
            click.style(option, fg='blue'),
            click.style(value, fg='green')
        ))
    else:
        # remove spaces when piped so that users can send that
        # to cut/awk/etc...
        click.echo('%s.%s=%s' % (section, option, value))


def _unset_option(option):
    try:
        section, key = option.split('.')
        if not config.unset(section, key):
            raise ValueError('unknown option')
        config.save()
    except BaseException:
        click.secho('error: unknown option %s' % option,
                    fg='red', err=True)
        sys.exit(1)



# Path: aeriscloud/cli/helpers.py
# class Command(click.Command):
#     # This is inherited by the Context to switch between pure POSIX and
#     # argparse-like argument parsing. Setting it to false will push any
#     # unknown flag to the argument located where the flag was declared
#     allow_interspersed_args = config.get('config', 'posix', default=False)
# 
#     def __init__(self, *args, **kwargs):
#         cs = dict(help_option_names=['-h', '--help'])
#         super(Command, self).__init__(context_settings=cs,
#                                       *args, **kwargs)
# 
# Path: aeriscloud/config.py
# def module_path():
#     def __init__(self):
#     def load(self):
#     def has(self, section, option):
#     def get(self, section, option, **kwargs):
#     def set(self, section, option, value):
#     def unset(self, section, option):
#     def save(self):
#     def dump(self):
#     def complete(self):
# def inventory_path():
# def config_dir():
# def data_dir():
# def config_ini_path():
# def projects_path():
# def basebox_bucket():
# def default_organization():
# def expose_username():
# def expose_url():
# def has_github_integration():
# def verbosity(val=None):
# class Config(object):


# Path: aeriscloud/cli/aeris/config.py
import click
import sys
from aeriscloud.cli.helpers import Command
from aeriscloud.config import config

#!/usr/bin/env python




def _display_option(section, option, value):
    if sys.stdout.isatty():
        click.echo('%s.%s = %s' % (
            click.style(section, fg='blue'),
            click.style(option, fg='blue'),
            click.style(value, fg='green')
        ))
    else:
        # remove spaces when piped so that users can send that
        # to cut/awk/etc...
        click.echo('%s.%s=%s' % (section, option, value))


def _unset_option(option):
    try:
        section, key = option.split('.')
        if not config.unset(section, key):
            raise ValueError('unknown option')
        config.save()
    except BaseException:
        click.secho('error: unknown option %s' % option,
                    fg='red', err=True)
        sys.exit(1)



@click.command(cls=Command)