configs  fish_prompt.fish at [1b4d0dba59]

File config/fish/functions/fish_prompt.fish artifact 0aab763240 part of check-in 1b4d0dba59


# vim: se ts=4:

function fish_prompt --description 'Write out the prompt'
	set -l last_status $status

	if not set -q __fish_prompt_normal
		set -g __fish_prompt_normal (set_color normal)
	end

	set_color $fish_color_hostname
	echo -n (hostname -s)
	set_color $fish_color_hostname_colon
	echo -n :

	# PWD
	set_color $fish_color_cwd
	echo -n (prompt_pwd)
	echo -n $__fish_prompt_normal

	echo -n (__fish_git_prompt)

	set_color $fish_color_prompt
	if [ $USER = root ]
		echo -n '# '
	else
		echo -n '$ '
	end

	echo -n $__fish_prompt_normal
end