diff --git a/docs/changelog.rst b/docs/changelog.rst index 557de7b99..e2d60bafc 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -38,6 +38,9 @@ To update |kitty|, :doc:`follow the instructions `. - Add :opt:`clear_all_mouse_actions` to clear all mouse actions defined to that point (:iss:`3907`) +- Fix the remote file kitten not working when using -- with ssh. The ssh kitten + was recently changed to do this (:iss:`3929`) + 0.22.2 [2021-08-02] ---------------------- diff --git a/kittens/ssh/main.py b/kittens/ssh/main.py index af0ed5852..72085ddc9 100644 --- a/kittens/ssh/main.py +++ b/kittens/ssh/main.py @@ -146,15 +146,20 @@ def get_connection_data(args: List[str]) -> Optional[SSHConnectionData]: port: Optional[int] = None expecting_port = False expecting_option_val = False + expecting_hostname = False for i, arg in enumerate(args): if not found_ssh: if os.path.basename(arg).lower() in ('ssh', 'ssh.exe'): found_ssh = arg continue + if expecting_hostname: + return SSHConnectionData(found_ssh, arg, port) if arg.startswith('-') and not expecting_option_val: if arg in boolean_ssh_args: continue + if arg == '--': + expecting_hostname = True if arg.startswith('-p'): if arg[2:].isdigit(): with suppress(Exception):