diff options
Diffstat (limited to 'man/man1/giteval.1')
-rw-r--r-- | man/man1/giteval.1 | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/man/man1/giteval.1 b/man/man1/giteval.1 new file mode 100644 index 0000000..6813432 --- /dev/null +++ b/man/man1/giteval.1 @@ -0,0 +1,31 @@ +.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) |