summaryrefslogtreecommitdiff
path: root/functions/fish_prompt.fish
blob: 51dbbd78efba976c9132959b56655dcd63fc84ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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' (set_color red) (pwd)
	if git status >/dev/null ^/dev/null
		printf '%s {%s}>: ' (set_color normal) (git branch | awk -F\  '{print $2}')
	else
		printf '%s>: ' (set_color normal)
	end
end