summaryrefslogtreecommitdiffstats
path: root/.config/fish
diff options
context:
space:
mode:
authorYigit Sever2024-04-02 21:40:03 +0300
committerYigit Sever2024-04-16 01:47:21 +0300
commitc5e1f082eb031889af2c5efcf4ca7f252584a80b (patch)
treedde2aaac1b1137fa3874126123274f43521759a8 /.config/fish
parent9ccecf09ed4b9a774227ecca1f51f214d4383b46 (diff)
downloaddotfiles-c5e1f082eb031889af2c5efcf4ca7f252584a80b.tar.gz
dotfiles-c5e1f082eb031889af2c5efcf4ca7f252584a80b.tar.bz2
dotfiles-c5e1f082eb031889af2c5efcf4ca7f252584a80b.zip
fish: show ssh'd hostname on prompt
Diffstat (limited to '.config/fish')
-rw-r--r--.config/fish/functions/fish_prompt.fish4
1 files changed, 4 insertions, 0 deletions
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
16 set marker "$marker_color# " 16 set marker "$marker_color# "
17 end 17 end
18 18
19 if set -q SSH_TTY
20 set -l marker "(prompt_hostname) $marker"
21 end
22
19 set -l cwd $cyan (string join / (string split -r -m3 / (prompt_pwd))[-3..-1]) 23 set -l cwd $cyan (string join / (string split -r -m3 / (prompt_pwd))[-3..-1])
20 24
21 echo -n -s $marker ' ' $cwd $normal ' ' 25 echo -n -s $marker ' ' $cwd $normal ' '