First stab at git-duet prompt segment
This commit is contained in:
parent
0c341b6702
commit
3542212e14
|
|
@ -90,6 +90,7 @@
|
|||
todo # todo items (https://github.com/todotxt/todo.txt-cli)
|
||||
timewarrior # timewarrior tracking status (https://timewarrior.net/)
|
||||
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
||||
# git_duet # git duet (https://github.com/git-duet/git-duet)
|
||||
# time # current time
|
||||
# =========================[ Line #2 ]=========================
|
||||
newline # \n
|
||||
|
|
@ -1493,6 +1494,10 @@
|
|||
# Custom prefix.
|
||||
# typeset -g POWERLEVEL9K_TIME_PREFIX='%248Fat '
|
||||
|
||||
####################################[ git_duet: current author+committer ]####################################
|
||||
# Current pair color
|
||||
typeset -g POWERLEVEL9K_GIT_DUET_FOREGROUND=15
|
||||
|
||||
# Example of a user-defined prompt segment. Function prompt_example will be called on every
|
||||
# prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or
|
||||
# POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user.
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@
|
|||
todo # todo items (https://github.com/todotxt/todo.txt-cli)
|
||||
timewarrior # timewarrior tracking status (https://timewarrior.net/)
|
||||
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
||||
# git_duet # git duet (https://github.com/git-duet/git-duet)
|
||||
# time # current time
|
||||
# =========================[ Line #2 ]=========================
|
||||
newline # \n
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@
|
|||
todo # todo items (https://github.com/todotxt/todo.txt-cli)
|
||||
timewarrior # timewarrior tracking status (https://timewarrior.net/)
|
||||
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
||||
# git_duet # git duet (https://github.com/git-duet/git-duet)
|
||||
# time # current time
|
||||
# =========================[ Line #2 ]=========================
|
||||
newline
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@
|
|||
todo # todo items (https://github.com/todotxt/todo.txt-cli)
|
||||
timewarrior # timewarrior tracking status (https://timewarrior.net/)
|
||||
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
||||
# git_duet # git duet (https://github.com/git-duet/git-duet)
|
||||
# time # current time
|
||||
# =========================[ Line #2 ]=========================
|
||||
newline
|
||||
|
|
|
|||
|
|
@ -3958,6 +3958,16 @@ prompt_vcs() {
|
|||
fi
|
||||
}
|
||||
|
||||
################################################################
|
||||
# Git-duet: Support for committer/author pair in git
|
||||
# see: https://github.com/git-duet/git-duet
|
||||
function prompt_git_duet() {
|
||||
GIT_DUET_INITIALS=$(echo $(git config --get-regexp "^duet.env.git-.*-initials" 2>/dev/null | sed -e 's/^.*-initials //') | sed -e 's/ /+/')
|
||||
if [[ ! -z "$GIT_DUET_INITIALS" ]]; then
|
||||
_p9k_prompt_segment $0 magenta white '' 0 '' "$GIT_DUET_INITIALS"
|
||||
fi
|
||||
}
|
||||
|
||||
################################################################
|
||||
# Vi Mode: show editing mode (NORMAL|INSERT|VISUAL)
|
||||
prompt_vi_mode() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue