1
0
Fork 0

fish: show username@host over ssh

This commit is contained in:
Von Random 2023-06-19 14:19:03 +03:00
parent 2476484618
commit 12f1b59a09
2 changed files with 6 additions and 0 deletions

View file

@ -1,6 +1,7 @@
function fish_prompt function fish_prompt
set -g prompt_string set -g prompt_string
set -g prev_color set -g prev_color
prompt.user
prompt.add blue (prompt_pwd) prompt.add blue (prompt_pwd)
prompt.git prompt.git
prompt.add normal $prompt_bang prompt.add normal $prompt_bang

View file

@ -0,0 +1,5 @@
function prompt.user
if test -n "$SSH_CLIENT" || string match -qe root "$USER"
prompt.add black $USER@$hostname
end
end