From 558fbda30cd7405dbf627663701dfbcd3c11b3e3 Mon Sep 17 00:00:00 2001 From: hoellen Date: Sat, 20 Jun 2020 15:20:01 +0200 Subject: [PATCH] Different prompt for remote shells --- .config/fish/prompt.fish | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.config/fish/prompt.fish b/.config/fish/prompt.fish index 950dbef..d0e99d0 100644 --- a/.config/fish/prompt.fish +++ b/.config/fish/prompt.fish @@ -79,11 +79,19 @@ function fish_prompt set arrow_color "$red" end - set -l arrow "$arrow_color➜ " + set -l arrow_user "$arrow_color➜ " if test "$USER" = 'root' - set arrow "$arrow_color# " + set -e arrow_user + set arrow_root "$arrow_color#" end + if set -q SSH_CLIENT || set -q SSH_TTY + set -e arrow_user + set arrow "$blue🌍" + end + + set -l arrow "$arrow$arrow_user$arrow_root" + set -l cwd $cyan(basename (prompt_pwd)) if set -l repo_type (_repo_type)