Skip to content

Commit

Permalink
Use new prompt_hostname function instead of rolling my own cache
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticdog committed Feb 11, 2017
1 parent 5145f06 commit 2080655
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions fish/.config/fish/functions/fish_right_prompt.fish
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ function fish_right_prompt --description 'Write out the right prompt'

# only display user and hostname when connected via ssh
if set -q SSH_CONNECTION
if not set -q __fish_prompt_hostname
set -g __fish_prompt_hostname (hostname -s)
end

if not set -q __fish_prompt_normal
set -g __fish_prompt_normal (set_color normal)
end
Expand All @@ -19,7 +15,7 @@ function fish_right_prompt --description 'Write out the right prompt'
end

# write out the right prompt
printf '%s%s%s at %s%s' (set_color cyan) $USER $__fish_prompt_normal $__fish_prompt_color_user $__fish_prompt_hostname
printf '%s%s%s at %s%s' (set_color cyan) $USER $__fish_prompt_normal $__fish_prompt_color_user (prompt_hostname)
end

end

0 comments on commit 2080655

Please sign in to comment.