Fix: ssh color

This commit is contained in:
2025-04-12 23:13:12 +08:00
parent bd5dd93420
commit a037afab9d

View File

@@ -20,7 +20,7 @@ function fish_prompt --description 'Informative prompt'
set cwd (string replace --regex "^$git_root" "($git_root_basename)" "$cwd")
end
set -l hostname_color (set_color brblue)
if test -n $SSH_CLIENT
if test -n "$SSH_CLIENT"
set hostname_color (set_color magenta)
end
printf '[%s] %s%s@%s%s %s%s%s%s %s %s\n> ' (date "+%H:%M:%S") \