# Path: ipodio/cli.py
# class Options(object):
#     def __init__(self, options, defaults=None):
#         self.defaults = defaults if defaults else {}
#         self.options = self._parse_options(options)
#         self.arguments = self._parse_arguments(options)
#         self.commands = self._parse_commands(options)
#         self.active_commands = self._parse_active_commands(self.commands)
#         self.active_command = self._parse_active_command(self.active_commands)
#         data = dict(self.options.items() + self.arguments.items())
#         self.data = self._parse_default_values(data, self.defaults)
# 
#     def _parse_default_values(self, options, defaults):
#         options.update({key: value for key, value in defaults.items()
#                         if options.get(key) is None})
#         return options
# 
#     def _parse_options(self, options):
#         return {k.replace('-', ''): v
#                 for k, v in options.items() if k.startswith('-')}
# 
#     def _parse_arguments(self, options):
#         return {k.replace('<', '').replace('>', ''): v
#                 for k, v in options.items() if k.startswith('<')}
# 
#     def _parse_commands(self, options):
#         return {k: v for k, v in options.items() if k[0] not in ('-', '<')}
# 
#     def _parse_active_commands(self, commands):
#         return [k for k, v in commands.items() if v]
# 
#     def _parse_active_command(self, active_commands):
#         return active_commands[0] if active_commands else None


from ipodio.cli import Options
from expects import expect
from mamba import describe, context, before
            'subsubcommand': False
        }

        _.all_options = {
            'o': 'a short option',
            'option': 'a long option'
        }

        _.all_arguments = {
            'argument': 'an argument',
            're-argument': 'a repeated argument'
        }

        _.all_data = {
            'o': 'a short option',
            'option': 'a long option',
            'argument': 'an argument',
            're-argument': 'a repeated argument'
        }

        _.all_commands = {
            'command': True,
            'subcommand': True,
            'subsubcommand': False
        }

        _.active_commands = ['command', 'subcommand']

        _.options = Options(_.parsed_input)


# Path: ipodio/cli.py
# class Options(object):
#     def __init__(self, options, defaults=None):
#         self.defaults = defaults if defaults else {}
#         self.options = self._parse_options(options)
#         self.arguments = self._parse_arguments(options)
#         self.commands = self._parse_commands(options)
#         self.active_commands = self._parse_active_commands(self.commands)
#         self.active_command = self._parse_active_command(self.active_commands)
#         data = dict(self.options.items() + self.arguments.items())
#         self.data = self._parse_default_values(data, self.defaults)
# 
#     def _parse_default_values(self, options, defaults):
#         options.update({key: value for key, value in defaults.items()
#                         if options.get(key) is None})
#         return options
# 
#     def _parse_options(self, options):
#         return {k.replace('-', ''): v
#                 for k, v in options.items() if k.startswith('-')}
# 
#     def _parse_arguments(self, options):
#         return {k.replace('<', '').replace('>', ''): v
#                 for k, v in options.items() if k.startswith('<')}
# 
#     def _parse_commands(self, options):
#         return {k: v for k, v in options.items() if k[0] not in ('-', '<')}
# 
#     def _parse_active_commands(self, commands):
#         return [k for k, v in commands.items() if v]
# 
#     def _parse_active_command(self, active_commands):
#         return active_commands[0] if active_commands else None


# Path: spec/unit/options_spec.py
from ipodio.cli import Options
from expects import expect
from mamba import describe, context, before

            'subsubcommand': False
        }

        _.all_options = {
            'o': 'a short option',
            'option': 'a long option'
        }

        _.all_arguments = {
            'argument': 'an argument',
            're-argument': 'a repeated argument'
        }

        _.all_data = {
            'o': 'a short option',
            'option': 'a long option',
            'argument': 'an argument',
            're-argument': 'a repeated argument'
        }

        _.all_commands = {
            'command': True,
            'subcommand': True,
            'subsubcommand': False
        }

        _.active_commands = ['command', 'subcommand']

        _.options = Options(_.parsed_input)


        _.empty_options = Options({})