fix: scope ssh shell niceties to cmux ssh
This commit is contained in:
parent
fb35f3bc39
commit
bbd8b2b311
4 changed files with 12 additions and 89 deletions
|
|
@ -29,19 +29,6 @@ fi
|
|||
[[ ! -r "$_cmux_file" ]] || builtin source -- "$_cmux_file"
|
||||
} always {
|
||||
if [[ -o interactive ]]; then
|
||||
# Opt into Ghostty's SSH shell niceties by default so plain `ssh ...`
|
||||
# gets TERM compatibility + remote terminfo setup.
|
||||
if [[ -n "${GHOSTTY_SHELL_FEATURES:-}" ]]; then
|
||||
builtin typeset _cmux_features=",$GHOSTTY_SHELL_FEATURES,"
|
||||
if [[ "$_cmux_features" != *",ssh-env,"* ]]; then
|
||||
builtin export GHOSTTY_SHELL_FEATURES="${GHOSTTY_SHELL_FEATURES},ssh-env"
|
||||
_cmux_features=",$GHOSTTY_SHELL_FEATURES,"
|
||||
fi
|
||||
if [[ "$_cmux_features" != *",ssh-terminfo,"* ]]; then
|
||||
builtin export GHOSTTY_SHELL_FEATURES="${GHOSTTY_SHELL_FEATURES},ssh-terminfo"
|
||||
fi
|
||||
fi
|
||||
|
||||
# We overwrote GhosttyKit's injected ZDOTDIR, so manually load Ghostty's
|
||||
# zsh integration if available.
|
||||
if [[ -n "${GHOSTTY_RESOURCES_DIR:-}" ]]; then
|
||||
|
|
@ -56,5 +43,5 @@ fi
|
|||
fi
|
||||
fi
|
||||
|
||||
builtin unset _cmux_file _cmux_features _cmux_ghostty _cmux_integ
|
||||
builtin unset _cmux_file _cmux_ghostty _cmux_integ
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue