2012-09-06 08:30:26 +00:00
|
|
|
# name: lonetwin
|
|
|
|
# author: Steve
|
|
|
|
|
|
|
|
function fish_prompt --description 'Write out the prompt'
|
|
|
|
# Just calculate these once, to save a few cycles when displaying the prompt
|
|
|
|
if not set -q __fish_prompt_hostname
|
2015-10-15 23:01:12 +00:00
|
|
|
set -g __fish_prompt_hostname (hostname -s)
|
2012-09-06 08:30:26 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
if not set -q __fish_prompt_normal
|
|
|
|
set -g __fish_prompt_normal (set_color normal)
|
|
|
|
end
|
|
|
|
|
|
|
|
if not set -q __fish_prompt_cwd
|
|
|
|
set -g __fish_prompt_cwd (set_color $fish_color_cwd)
|
|
|
|
end
|
|
|
|
|
|
|
|
echo -n -s "$USER" @ "$__fish_prompt_hostname" ' ' "$__fish_prompt_cwd" (prompt_pwd) (__fish_git_prompt) "$__fish_prompt_normal" '> '
|
|
|
|
|
|
|
|
end
|