예제 #1
0
파일: runners.py 프로젝트: jkrass1/vimiv-qt
def alias(text: str, mode: api.modes.Mode) -> str:
    """Replace alias with the actual command.

    Returns:
        The replaced text if text was an alias else text.
    """
    cmd = text.split()[0]
    if cmd in aliases.get(mode):
        text = text.replace(cmd, aliases.get(mode)[cmd])
        return wildcards.expand_internal(text, mode)
    return text
예제 #2
0
 def print_output() -> None:
     print(wildcards.expand_internal(args.output, api.modes.current()))
예제 #3
0
파일: runners.py 프로젝트: jkrass1/vimiv-qt
 def update_part(text: str) -> str:
     """Update aliases and % in final parts without separator."""
     if SEPARATOR in text:
         return text
     return wildcards.expand_internal(alias(text.strip(), mode), mode)