mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 01:38:02 +02:00
Move class definition to utils so can be used from multiple kittens easily
This commit is contained in:
@@ -8,7 +8,9 @@ import shlex
|
||||
import subprocess
|
||||
import sys
|
||||
from contextlib import suppress
|
||||
from typing import List, NamedTuple, NoReturn, Optional, Set, Tuple
|
||||
from typing import List, NoReturn, Optional, Set, Tuple
|
||||
|
||||
from kitty.utils import SSHConnectionData
|
||||
|
||||
SHELL_SCRIPT = '''\
|
||||
#!/bin/sh
|
||||
@@ -61,12 +63,6 @@ def get_ssh_cli() -> Tuple[Set[str], Set[str]]:
|
||||
return set('-' + x for x in boolean_ssh_args), set('-' + x for x in other_ssh_args)
|
||||
|
||||
|
||||
class SSHConnectionData(NamedTuple):
|
||||
binary: str
|
||||
hostname: str
|
||||
port: Optional[int] = None
|
||||
|
||||
|
||||
def get_connection_data(args: List[str]) -> Optional[SSHConnectionData]:
|
||||
boolean_ssh_args, other_ssh_args = get_ssh_cli()
|
||||
found_ssh = ''
|
||||
|
||||
Reference in New Issue
Block a user