fix: use kebab-case for ssh-integration enum values

This commit is contained in:
Jason Rayne
2025-06-13 17:03:20 -07:00
parent 142e07c502
commit 8f93d8fe03
5 changed files with 22 additions and 22 deletions

View File

@ -6114,7 +6114,7 @@ pub const ShellIntegrationFeatures = packed struct {
///
/// * `off` - No SSH integration, use standard ssh command
///
/// * `term_only` - Only fix TERM compatibility (xterm-ghostty -> xterm-256color)
/// * `term-only` - Only fix TERM compatibility (xterm-ghostty -> xterm-256color)
///
/// * `basic` - TERM fix + environment variable propagation
///
@ -6123,7 +6123,7 @@ pub const ShellIntegrationFeatures = packed struct {
/// The default value is `off`.
pub const SSHIntegration = enum {
off,
term_only,
@"term-only",
basic,
full,

View File

@ -111,8 +111,8 @@ if [[ -n "$GHOSTTY_SSH_INTEGRATION" && "$GHOSTTY_SSH_INTEGRATION" != "off" ]]; t
# will take precedence over this function, and it won't be wrapped.
function ssh {
case "$GHOSTTY_SSH_INTEGRATION" in
"term_only")
_ghostty_ssh_term_only "$@"
"term-only")
_ghostty_ssh_term-only "$@"
;;
"basic")
_ghostty_ssh_basic "$@"
@ -127,8 +127,8 @@ if [[ -n "$GHOSTTY_SSH_INTEGRATION" && "$GHOSTTY_SSH_INTEGRATION" != "off" ]]; t
esac
}
# Level: term_only - Just fix TERM compatibility
_ghostty_ssh_term_only() {
# Level: term-only - Just fix TERM compatibility
_ghostty_ssh_term-only() {
if [[ "$TERM" == "xterm-ghostty" ]]; then
TERM=xterm-256color command ssh "$@"
else

View File

@ -100,7 +100,7 @@
fn ssh-with-ghostty-integration {|@args|
if (and (has-env GHOSTTY_SSH_INTEGRATION) (not-eq "" $E:GHOSTTY_SSH_INTEGRATION) (not-eq "off" $E:GHOSTTY_SSH_INTEGRATION)) {
if (eq "term_only" $E:GHOSTTY_SSH_INTEGRATION) {
if (eq "term-only" $E:GHOSTTY_SSH_INTEGRATION) {
ssh-term-only $@args
} elif (eq "basic" $E:GHOSTTY_SSH_INTEGRATION) {
ssh-basic $@args
@ -116,7 +116,7 @@
}
fn ssh-term-only {|@args|
# Level: term_only - Just fix TERM compatibility
# Level: term-only - Just fix TERM compatibility
if (eq "xterm-ghostty" $E:TERM) {
TERM=xterm-256color (external ssh) $@args
} else {

View File

@ -90,8 +90,8 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration"
if test -n "$GHOSTTY_SSH_INTEGRATION"; and test "$GHOSTTY_SSH_INTEGRATION" != off
function ssh -d "Wrap ssh to provide Ghostty SSH integration"
switch "$GHOSTTY_SSH_INTEGRATION"
case term_only
_ghostty_ssh_term_only $argv
case term-only
_ghostty_ssh_term-only $argv
case basic
_ghostty_ssh_basic $argv
case full
@ -102,8 +102,8 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration"
end
end
# Level: term_only - Just fix TERM compatibility
function _ghostty_ssh_term_only -d "SSH with TERM compatibility fix"
# Level: term-only - Just fix TERM compatibility
function _ghostty_ssh_term-only -d "SSH with TERM compatibility fix"
if test "$TERM" = xterm-ghostty
TERM=xterm-256color command ssh $argv
else

View File

@ -249,8 +249,8 @@ _ghostty_deferred_init() {
# Wrap `ssh` command to provide Ghostty SSH integration
ssh() {
case "$GHOSTTY_SSH_INTEGRATION" in
"term_only")
_ghostty_ssh_term_only "$@"
"term-only")
_ghostty_ssh_term-only "$@"
;;
"basic")
_ghostty_ssh_basic "$@"
@ -265,8 +265,8 @@ _ghostty_deferred_init() {
esac
}
# Level: term_only - Just fix TERM compatibility
_ghostty_ssh_term_only() {
# Level: term-only - Just fix TERM compatibility
_ghostty_ssh_term-only() {
if [[ "$TERM" == "xterm-ghostty" ]]; then
TERM=xterm-256color builtin command ssh "$@"
else