# Path: rash/utils/confutils.py
# def get_config_directory(appname):
#     """
#     Get OS-specific configuration directory.
# 
#     :type appname: str
#     :arg  appname: capitalized name of the application
# 
#     """
#     if platform.system().lower() == 'windows':
#         path = os.path.join(os.getenv('APPDATA') or '~', appname, appname)
#     elif platform.system().lower() == 'darwin':
#         path = os.path.join('~', 'Library', 'Application Support', appname)
#     else:
#         path = os.path.join(os.getenv('XDG_CONFIG_HOME') or '~/.config',
#                             appname.lower())
#     return os.path.expanduser(path)
# 
# Path: rash/utils/pathutils.py
# def mkdirp(path):
#     """
#     Make directory at `path` if it does not exist.
#     """
#     if not os.path.isdir(path):
#         os.makedirs(path)


import os
from .utils.confutils import get_config_directory
from .utils.pathutils import mkdirp
        """


class SearchConfig(object):

    """
    Search configuration.
    """

    def __init__(self):

        self.alias = {}
        r"""
        Search query alias.

        It must be a dict-like object that maps a str to a list of str
        when "expanding" search query.

        Example:

        >>> config = Configuration()
        >>> config.search.alias['test'] = \
        ...     ["--exclude-pattern", "*rash *", "--include-pattern", "*test*"]

        then,::

            rash search test

        is equivalent to::


# Path: rash/utils/confutils.py
# def get_config_directory(appname):
#     """
#     Get OS-specific configuration directory.
# 
#     :type appname: str
#     :arg  appname: capitalized name of the application
# 
#     """
#     if platform.system().lower() == 'windows':
#         path = os.path.join(os.getenv('APPDATA') or '~', appname, appname)
#     elif platform.system().lower() == 'darwin':
#         path = os.path.join('~', 'Library', 'Application Support', appname)
#     else:
#         path = os.path.join(os.getenv('XDG_CONFIG_HOME') or '~/.config',
#                             appname.lower())
#     return os.path.expanduser(path)
# 
# Path: rash/utils/pathutils.py
# def mkdirp(path):
#     """
#     Make directory at `path` if it does not exist.
#     """
#     if not os.path.isdir(path):
#         os.makedirs(path)


# Path: rash/config.py
import os
from .utils.confutils import get_config_directory
from .utils.pathutils import mkdirp

        """


class SearchConfig(object):

    """
    Search configuration.
    """

    def __init__(self):

        self.alias = {}
        r"""
        Search query alias.

        It must be a dict-like object that maps a str to a list of str
        when "expanding" search query.

        Example:

        >>> config = Configuration()
        >>> config.search.alias['test'] = \
        ...     ["--exclude-pattern", "*rash *", "--include-pattern", "*test*"]

        then,::

            rash search test

        is equivalent to::


            rash search --exclude-pattern "*rash *" --include-pattern "*test*"