configs  Artifact [0aab763240]

Artifact 0aab7632401c52f38b1f5f0559257b78e237291c3e0d069d53b422d115b8527c:

  • File config/fish/functions/fish_prompt.fish — part of check-in [5334b70051] at 2015-02-15 19:27:52 on branch trunk — Add fish config (user: js size: 546)

# 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