summaryrefslogtreecommitdiff
path: root/functions/fish_prompt.fish
blob: 9be04c237253f4adb4ef9aaff2a557645ff0228e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function fish_prompt
	printf '['
	printf '%s%s%s' (set_color blue) (echo $USER) (set_color normal)
	printf '@'
	printf '%s%s%s' (set_color green) (cat /etc/hostname) (set_color normal)
	printf '] '

	printf '%s%s%s' (set_color red) (pwd) (set_color normal)

	if git status >/dev/null ^/dev/null
		printf ' {%s}' (git branch | grep '\*' | awk -F\  '{print $2}')
	end

	printf '>: '
end