diff options
author | Jesús <heckyel@hyperbola.info> | 2021-08-17 16:26:03 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-08-17 16:26:03 -0500 |
commit | baefc5c6f9e65806452aa7258825b1852959c1f5 (patch) | |
tree | ffe76a3cc655eddcf0bc9e626d964a809f7b76d3 /hyperterm/core/git.sh | |
parent | 7a1004b72b8bc738cad56abc212a82cddd1caad0 (diff) | |
download | hyperterm-baefc5c6f9e65806452aa7258825b1852959c1f5.tar.lz hyperterm-baefc5c6f9e65806452aa7258825b1852959c1f5.tar.xz hyperterm-baefc5c6f9e65806452aa7258825b1852959c1f5.zip |
simply __prompt_git
Diffstat (limited to 'hyperterm/core/git.sh')
-rw-r--r-- | hyperterm/core/git.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hyperterm/core/git.sh b/hyperterm/core/git.sh index 17bb575..55814dd 100644 --- a/hyperterm/core/git.sh +++ b/hyperterm/core/git.sh @@ -330,3 +330,12 @@ _prompt_get_git_info() { printf '%b%s%b' "${BOLD}${LEMON}" "git:($output" "${BOLD}${LEMON})" fi } + +__prompt_git() { + if _prompt_is_on_git &> /dev/null; then + echo -n "${BOLD}${WHITE} on $RESET" && \ + echo -n "$(_prompt_get_git_info "$@")" && \ + echo -n "${BOLD}${RED}$(_get_git_progress)" && \ + echo -n "$RESET" + fi +} |