shell-integration: invoke resolved Ghostty CLI path
Merged
AU
4mo ago+77+77+01234567890123456789-20-20-01234567890123456789
Summary
- export an exact
GHOSTTY_BINexecutable path for shell integration - let embedded hosts provide a CLI helper outside the GUI executable directory
- make zsh, bash, fish, nushell, and elvish SSH wrappers invoke the resolved path
- skip installing a broken SSH wrapper when an embedded host has no helper
This fixes manaflow-ai/cmux#8093, where embedded Ghostty derived /Applications/cmux.app/Contents/MacOS/ghostty from the cmux GUI executable even though the CLI helper lives in Contents/Resources/bin.
Verification
- zsh, bash, and fish syntax checks
- cmux behavioral zsh/bash wrapper regression
- focused Zig resolver tests added (cold full test graph deferred to parent CI)
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.
Summary by cubic
Export and use the exact Ghostty CLI path for shell integration so SSH wrappers call the correct binary, including when Ghostty runs inside an embedded host app. Prevents wrong-path derivation and disables the SSH wrapper when no helper is available.
- Bug Fixes
- Export
GHOSTTY_BIN(exact CLI path) and keepGHOSTTY_BIN_DIR; append its directory toPATH. - Update zsh/bash/fish/nushell/elvish SSH wrappers to invoke
GHOSTTY_BINand only install when it’s set. - Add a resolver and tests to choose the native
ghosttyor an embedded helper, fixing incorrect paths in hosts like cmux.
- Export
Summary by CodeRabbit
-
New Features
- Improved SSH integration across supported shells by reliably locating and launching Ghostty.
- Added support for embedded runtime environments when enabling Ghostty’s SSH features.
-
Bug Fixes
- SSH commands now fall back to the system SSH client when Ghostty’s executable is unavailable.
- Improved executable path and environment handling for shell integrations.