mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-06 01:05:48 +02:00
...
This commit is contained in:
@@ -160,13 +160,11 @@ _ksi_main() {
|
||||
# connected to most SSH servers
|
||||
# or use ssh kitten to connected to some SSH servers that do not set SSH_TTY
|
||||
_ksi_prompt[hostname_prefix]="\h: "
|
||||
else
|
||||
if [[ -n "$(builtin command -v who)" && "$(builtin command who -m 2> /dev/null)" =~ "\([a-fA-F.:0-9]+\)$" ]]; then
|
||||
# the shell integration script is installed manually on the remote system
|
||||
# the environment variables are cleared after sudo
|
||||
# OpenSSH's sshd creates entries in utmp for every login so use those
|
||||
_ksi_prompt[hostname_prefix]="\h: "
|
||||
fi
|
||||
elif [[ -n "$(builtin command -v who)" && "$(builtin command who -m 2> /dev/null)" =~ "\([a-fA-F.:0-9]+\)$" ]]; then
|
||||
# the shell integration script is installed manually on the remote system
|
||||
# the environment variables are cleared after sudo
|
||||
# OpenSSH's sshd creates entries in utmp for every login so use those
|
||||
_ksi_prompt[hostname_prefix]="\h: "
|
||||
fi
|
||||
fi
|
||||
# see https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html#Controlling-the-Prompt
|
||||
|
||||
Reference in New Issue
Block a user