fish: only display the hostname over ssh

This commit is contained in:
Charles Gould 2020-03-22 02:46:38 +00:00
parent 7f92cd6eea
commit 8b2ec9ef34
2 changed files with 7 additions and 8 deletions

View File

@ -2,6 +2,13 @@ function fish_prompt --description 'Write out the prompt'
# Save status code for previous command # Save status code for previous command
set -l last_status $status set -l last_status $status
# If we're running via SSH, display the hostname
if set -q SSH_TTY
set_color $fish_color_host_remote
echo -n "$hostname "
set_color normal
end
# Print working directory # Print working directory
set_color $fish_color_cwd set_color $fish_color_cwd
echo -n (prompt_pwd) echo -n (prompt_pwd)

View File

@ -1,8 +0,0 @@
function fish_right_prompt --description 'Write out the right prompt'
# If we're running via SSH, display the hostname
if set -q SSH_TTY
set_color $fish_color_host_remote
echo -n $hostname
set_color normal
end
end