mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-09-05 17:28:36 +00:00
Adds kittens/remote_file/main.go (ask menu, hostname-mismatch prompt, save-path prompt with tab completion, edit/open/save actions) on top of the ControlMaster/ssh helpers from the previous two commits, registers it in tools/cmd/tool/main.go, and adds remote_file to shell-integration/ssh/kitty's wrapped_kittens list so both `kitty +kitten remote_file` and ssh-session invocations exec the Go binary directly. main.py is shrunk to option_text (kept importable by kitty/cli_stub.py and used for --doc/--help generation), is_ssh_kitten_sentinel (kept importable by kitty/window.py), and the handle_result shim boss.py runs in-process to open the returned file. Also drops the dead `-h` alias on --hostname: Python's CLI layer always special-cases -h/--help ahead of user options, so it never worked as a hostname shorthand, but the Go CLI layer hard-errors on the collision; removing it is a no-op for existing behavior (boss.py only ever passes --hostname) and unblocks `kitten remote-file --help`. Also adds the same reset_terminal() calls Python makes between UI phases (ask menu -> action, hostname-mismatch prompt, overwrite prompt, $EDITOR handoff) so the Go and Python screens match. Manually verified parity against Python (ask menu, cancel, open/edit/save download+upload round-trips, hostname-mismatch Y/N, save-path prompt and overwrite O/A/R/N) using a fake-ssh test double, and confirmed post-wrap that `kitty +kitten remote_file` execs the Go kitten binary. |
||
|---|---|---|
| .. | ||
| confirm_and_run_shebang.go | ||
| main.go | ||