fish: show username@host over ssh
This commit is contained in:
parent
2476484618
commit
12f1b59a09
2 changed files with 6 additions and 0 deletions
|
@ -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
|
||||||
|
|
5
cli/.config/fish/functions/prompt.user.fish
Normal file
5
cli/.config/fish/functions/prompt.user.fish
Normal 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
|
Loading…
Reference in a new issue