Skip to content

shell-integration: preserve fish SSH feature variants - #117

Open
austinywang wants to merge 1 commit into
mainfrom
issue-8093-fish-feature-precedence
Open

shell-integration: preserve fish SSH feature variants#117
austinywang wants to merge 1 commit into
mainfrom
issue-8093-fish-feature-precedence

Conversation

@austinywang

@austinywang austinywang commented Jul 15, 2026

Copy link
Copy Markdown

Fix the fish-shell condition added by #115 so ssh-env by itself still installs the Ghostty SSH wrapper.

Fish evaluates semicolon-chained and/or commands left-to-right. Repeating the GHOSTTY_BIN guard in a single condition therefore made the final ssh-terminfo check override a successful ssh-env check. Nest the feature disjunction below the executable guard so each feature works independently.

Focused proof in manaflow-ai/cmux#8109 sources the real fish integration and verifies ssh-env, ssh-terminfo, and both feature flags against a host-provided executable path. The test failed with exit 97 (fish SSH wrapper was not installed) before this change and passes after it.

Validation:

  • python3 tests/test_issue_8093_ghostty_ssh_binary_path.py (from cmux checkout)
  • fish --no-config --no-execute src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish
  • zsh/bash integration syntax checks

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


Summary by cubic

Fix the fish SSH wrapper so ssh-env and ssh-terminfo work independently. The wrapper now installs when either feature is enabled, aligning with issue 8093’s feature precedence.

  • Bug Fixes
    • Nest feature checks under a single test -n "$GHOSTTY_BIN" guard to avoid fish’s left-to-right and/or precedence overriding ssh-env.
    • Preserve per-feature behavior: missing ssh-env adds --forward-env=false; missing ssh-terminfo adds --terminfo=false.

Written for commit 84555c3. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b6171dc3-fa2c-403c-b245-487522a4cf88

📥 Commits

Reviewing files that changed from the base of the PR and between 67b388b and 84555c3.

📒 Files selected for processing (1)
  • src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish

📝 Walkthrough

Walkthrough

The Fish SSH integration now checks GHOSTTY_BIN separately from enabled SSH features before defining the ssh wrapper. The wrapper’s existing feature-flag argument logic and +ssh invocation remain unchanged.

Changes

SSH wrapper integration

Layer / File(s) Summary
Gate SSH wrapper installation
src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish
The wrapper is defined only when GHOSTTY_BIN is set and either ssh-env or ssh-terminfo is enabled; its internal flag handling is unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: jparise

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the change to Fish shell SSH integration and the handling of SSH feature variants.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-8093-fish-feature-precedence

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 15, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes the fish SSH wrapper feature guard. The main changes are:

  • Require GHOSTTY_BIN before checking SSH feature flags.
  • Install the fish ssh wrapper when either ssh-env or ssh-terminfo is enabled.
  • Preserve the existing wrapper flag translation for disabled SSH subfeatures.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish Restructures the fish SSH wrapper condition so the executable guard wraps the feature disjunction.

Reviews (1): Last reviewed commit: "shell-integration: preserve fish SSH fea..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant