pass_typer: Allow for environment variables before ssh command

This commit is contained in:
Adam Goldsmith 2022-07-06 23:28:23 -04:00
parent f2c68a5f17
commit 319aca391d

View File

@ -63,7 +63,7 @@ def select_and_type(server_name: Path) -> None:
window_name = cmd(["xdotool", "getactivewindow", "getwindowname"]).stdout.strip() window_name = cmd(["xdotool", "getactivewindow", "getwindowname"]).stdout.strip()
ssh_match = re.search(":(mosh|ssh) (?P<server>.*)", window_name) ssh_match = re.search(":([^ ]+=[^ ]* )*(mosh|ssh) (?P<server>.*)", window_name)
if ssh_match: if ssh_match:
server_name = alias(ssh_match.group("server")) server_name = alias(ssh_match.group("server"))