.TH giteval 1 2023-02-11 utils .SH NAME giteval \- print name and state of current git branch .SH SYNOPSIS .B giteval .SH DESCRIPTION .B giteval is intended to be used for the shell prompt, to display the name of the current branch, colour-coded for the current state of the branch. It can be used as a command of its own, but it is not as useful that way, because its output is intended to be interpreted by the shell's prompt formatter. .SH EXAMPLES For .BR bash (1): .RS .EX PROMPT_COMMAND='git_branch=$(giteval)' PS1='\eu@\eh:\ew${git_branch@P}$' .EE .RE .SH SEE ALSO .BR git (1),\ git-branch (1),\ git-status (1),\ bash (1)