Skip to content

Commit

Permalink
Change hostname variable name to avoid scope error
Browse files Browse the repository at this point in the history
Add check for existing fish `hostname` variable
  • Loading branch information
edouard-lopez committed Dec 12, 2018
1 parent 40b8da9 commit 25b7671
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions functions/_pure_prompt_host.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
function _pure_prompt_host
set --local hostname (hostname -s) # current host name
set -qg hostname
or set --local hostname (hostname -s) # current host name
set --local hostname_color "$pure_host_color"

echo "$hostname_color$hostname"
end
end

0 comments on commit 25b7671

Please sign in to comment.