def cmd_settings(cmd):
    """
    Return the default settings with settings for the command merged in
    """
    d = {}
    for setting in ['exec_args', 'surround_cmd']:
        d[setting] = settings().get(setting)
    try:
        settings_for_cmd = next((c for c
                            in settings().get('cmd_settings')
                            if re.search(c['cmd_regex'], cmd)))
        d.update(settings_for_cmd)
    except __HOLE__:
        pass
    return d
dataset/ETHPy150Open misfo/Shell-Turtlestein/shell_turtlestein.py/cmd_settings