mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 16:26:08 +03:00
fix: use kebab-case for ssh-integration enum values
This commit is contained in:
@ -6114,7 +6114,7 @@ pub const ShellIntegrationFeatures = packed struct {
|
|||||||
///
|
///
|
||||||
/// * `off` - No SSH integration, use standard ssh command
|
/// * `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
|
/// * `basic` - TERM fix + environment variable propagation
|
||||||
///
|
///
|
||||||
@ -6123,7 +6123,7 @@ pub const ShellIntegrationFeatures = packed struct {
|
|||||||
/// The default value is `off`.
|
/// The default value is `off`.
|
||||||
pub const SSHIntegration = enum {
|
pub const SSHIntegration = enum {
|
||||||
off,
|
off,
|
||||||
term_only,
|
@"term-only",
|
||||||
basic,
|
basic,
|
||||||
full,
|
full,
|
||||||
|
|
||||||
|
@ -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.
|
# will take precedence over this function, and it won't be wrapped.
|
||||||
function ssh {
|
function ssh {
|
||||||
case "$GHOSTTY_SSH_INTEGRATION" in
|
case "$GHOSTTY_SSH_INTEGRATION" in
|
||||||
"term_only")
|
"term-only")
|
||||||
_ghostty_ssh_term_only "$@"
|
_ghostty_ssh_term-only "$@"
|
||||||
;;
|
;;
|
||||||
"basic")
|
"basic")
|
||||||
_ghostty_ssh_basic "$@"
|
_ghostty_ssh_basic "$@"
|
||||||
@ -127,8 +127,8 @@ if [[ -n "$GHOSTTY_SSH_INTEGRATION" && "$GHOSTTY_SSH_INTEGRATION" != "off" ]]; t
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# Level: term_only - Just fix TERM compatibility
|
# Level: term-only - Just fix TERM compatibility
|
||||||
_ghostty_ssh_term_only() {
|
_ghostty_ssh_term-only() {
|
||||||
if [[ "$TERM" == "xterm-ghostty" ]]; then
|
if [[ "$TERM" == "xterm-ghostty" ]]; then
|
||||||
TERM=xterm-256color command ssh "$@"
|
TERM=xterm-256color command ssh "$@"
|
||||||
else
|
else
|
||||||
|
@ -100,7 +100,7 @@
|
|||||||
|
|
||||||
fn ssh-with-ghostty-integration {|@args|
|
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 (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
|
ssh-term-only $@args
|
||||||
} elif (eq "basic" $E:GHOSTTY_SSH_INTEGRATION) {
|
} elif (eq "basic" $E:GHOSTTY_SSH_INTEGRATION) {
|
||||||
ssh-basic $@args
|
ssh-basic $@args
|
||||||
@ -116,7 +116,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn ssh-term-only {|@args|
|
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) {
|
if (eq "xterm-ghostty" $E:TERM) {
|
||||||
TERM=xterm-256color (external ssh) $@args
|
TERM=xterm-256color (external ssh) $@args
|
||||||
} else {
|
} else {
|
||||||
|
@ -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
|
if test -n "$GHOSTTY_SSH_INTEGRATION"; and test "$GHOSTTY_SSH_INTEGRATION" != off
|
||||||
function ssh -d "Wrap ssh to provide Ghostty SSH integration"
|
function ssh -d "Wrap ssh to provide Ghostty SSH integration"
|
||||||
switch "$GHOSTTY_SSH_INTEGRATION"
|
switch "$GHOSTTY_SSH_INTEGRATION"
|
||||||
case term_only
|
case term-only
|
||||||
_ghostty_ssh_term_only $argv
|
_ghostty_ssh_term-only $argv
|
||||||
case basic
|
case basic
|
||||||
_ghostty_ssh_basic $argv
|
_ghostty_ssh_basic $argv
|
||||||
case full
|
case full
|
||||||
@ -102,8 +102,8 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration"
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Level: term_only - Just fix TERM compatibility
|
# Level: term-only - Just fix TERM compatibility
|
||||||
function _ghostty_ssh_term_only -d "SSH with TERM compatibility fix"
|
function _ghostty_ssh_term-only -d "SSH with TERM compatibility fix"
|
||||||
if test "$TERM" = xterm-ghostty
|
if test "$TERM" = xterm-ghostty
|
||||||
TERM=xterm-256color command ssh $argv
|
TERM=xterm-256color command ssh $argv
|
||||||
else
|
else
|
||||||
|
@ -249,8 +249,8 @@ _ghostty_deferred_init() {
|
|||||||
# Wrap `ssh` command to provide Ghostty SSH integration
|
# Wrap `ssh` command to provide Ghostty SSH integration
|
||||||
ssh() {
|
ssh() {
|
||||||
case "$GHOSTTY_SSH_INTEGRATION" in
|
case "$GHOSTTY_SSH_INTEGRATION" in
|
||||||
"term_only")
|
"term-only")
|
||||||
_ghostty_ssh_term_only "$@"
|
_ghostty_ssh_term-only "$@"
|
||||||
;;
|
;;
|
||||||
"basic")
|
"basic")
|
||||||
_ghostty_ssh_basic "$@"
|
_ghostty_ssh_basic "$@"
|
||||||
@ -265,8 +265,8 @@ _ghostty_deferred_init() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# Level: term_only - Just fix TERM compatibility
|
# Level: term-only - Just fix TERM compatibility
|
||||||
_ghostty_ssh_term_only() {
|
_ghostty_ssh_term-only() {
|
||||||
if [[ "$TERM" == "xterm-ghostty" ]]; then
|
if [[ "$TERM" == "xterm-ghostty" ]]; then
|
||||||
TERM=xterm-256color builtin command ssh "$@"
|
TERM=xterm-256color builtin command ssh "$@"
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user