summaryrefslogtreecommitdiff
path: root/functions/fish_prompt.fish
blob: 9cc8ef75b09bc0a96dbbf8d6578c0001c8f21ad4 (plain)
1
2
3
4
5
6
7
8
9
function fish_prompt
	printf '[%s@%s] ' (echo $USERNAME) (cat /etc/hostname)
	if test -d .git
		printf '%s%s %s(%s)' (set_color red) (pwd) (set_color blue) (git branch | grep "*" | awk -F" " '{print $2}')
	else
		printf '%s%s' (set_color red) (pwd)
	end
	printf '%s>: ' (set_color normal)
end