Ejemplo n.º 1
0
def match(command):
    if 'not found' not in command.output:
        return False

    matched_layout = _get_matched_layout(command)
    return (matched_layout and
            _switch_command(command, matched_layout) != get_alias())
Ejemplo n.º 2
0
def match(command):
    if 'not found' not in command.output:
        return False

    matched_layout = _get_matched_layout(command)
    return (matched_layout
            and _switch_command(command, matched_layout) != get_alias())
Ejemplo n.º 3
0
def _history_of_exists_without_current(command):
    history = shell.get_history()
    tf_alias = get_alias()
    executables = get_all_executables()
    return [
        line for line in _not_corrected(history, tf_alias)
        if not line.startswith(tf_alias) and not line == command.script
        and line.split(' ')[0] in executables
    ]
Ejemplo n.º 4
0
def match(command):
    if "not found" not in command.output:
        return False
    if any(u"ㄱ" <= ch <= u"ㅎ" or u"ㅏ" <= ch <= u"ㅣ" or u"가" <= ch <= u"힣"
           for ch in command.script):
        return True

    matched_layout = _get_matched_layout(command)
    return matched_layout and _switch_command(command,
                                              matched_layout) != get_alias()
Ejemplo n.º 5
0
def match(command):
    if 'not found' not in command.output:
        return False
    if any(u'ㄱ' <= ch <= u'ㅎ' or u'ㅏ' <= ch <= u'ㅣ' or u'가' <= ch <= u'힣'
            for ch in command.script):
        return True

    matched_layout = _get_matched_layout(command)
    return (matched_layout and
            _switch_command(command, matched_layout) != get_alias())
Ejemplo n.º 6
0
def match(command):
    if 'not found' not in command.stderr:
        return False
    matched_layout = _get_matched_layout(command)
    return matched_layout and \
           _switch_command(command, matched_layout) != get_alias()