mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-25 22:38:36 +00:00
Add a drop-in `ssh` wrapper that sets up the remote environment for Ghostty. Anything not consumed as one of our own flags is forwarded to the real, wrapped `ssh` binary. It can be used directly (`ghostty +ssh user@host`), aliased (`alias ssh='ghostty +ssh --'`), or invoked through Ghostty's shell integration. Before exec'ing ssh, `+ssh`: - Forwards Ghostty environment to the remote (`--forward-env`): sets TERM=xterm-256color and requests SendEnv forwarding of COLORTERM, TERM_PROGRAM, and TERM_PROGRAM_VERSION. - Installs Ghostty's terminfo on the remote (`--terminfo`), informed by our existing `ssh-cache` system and using our internal xterm-ghostty terminfo representation. A third flag, `--cache`, controls cache use; `--cache=false` bypasses both read and write, which is useful for scripting and for debugging install failures without polluting the cache. For shell integration, this replaces the per-shell logic (which made up roughly a third of our shell integration scripts) with a simple wrapper function that translates GHOSTTY_SHELL_FEATURES into a `ghostty +ssh` command line.
Subcommand Actions
This is the cli specific code. It contains cli actions and tui definitions and argument parsing.
This README is meant as developer documentation and not as user documentation. For user documentation, see the main README or ghostty.org.
Updating documentation
Each cli action is defined in it's own file. Documentation for each action is defined
in the doc comment associated with the run function. For example the run function
in list_keybinds.zig contains the help text for ghostty +list-keybinds.