From c5e1f082eb031889af2c5efcf4ca7f252584a80b Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Tue, 2 Apr 2024 21:40:03 +0300 Subject: fish: show ssh'd hostname on prompt --- .config/fish/functions/fish_prompt.fish | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.config/fish/functions/fish_prompt.fish b/.config/fish/functions/fish_prompt.fish index 3b6e639..62e3d68 100644 --- a/.config/fish/functions/fish_prompt.fish +++ b/.config/fish/functions/fish_prompt.fish @@ -16,6 +16,10 @@ function fish_prompt set marker "$marker_color# " end + if set -q SSH_TTY + set -l marker "(prompt_hostname) $marker" + end + set -l cwd $cyan (string join / (string split -r -m3 / (prompt_pwd))[-3..-1]) echo -n -s $marker ' ' $cwd $normal ' ' -- cgit v1.2.3-70-g09d2