summaryrefslogtreecommitdiff
path: root/man/man1/giteval.1
diff options
context:
space:
mode:
authorDavid Wührer <def@gmx.at>2024-05-18 21:04:34 +0200
committerDavid Wührer <def@gmx.at>2024-05-18 21:04:34 +0200
commit77cfffee6177fb0421fa0fce15d6a1875bde4816 (patch)
tree251428cdd482ea50cfb019dbd3c3bafd79d2fd14 /man/man1/giteval.1
parent75b23ce1ff0daab363725a2a5755ea80bbeaa68e (diff)
manuals, sum-down, radix
Diffstat (limited to 'man/man1/giteval.1')
-rw-r--r--man/man1/giteval.131
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)