From ed3b8eeae76bbd3082ae1b5ce846e10d112ec4f9 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Thu, 28 Dec 2023 11:27:46 +0100 Subject: [PATCH] git: fancy git-st status script --- bin/git-st | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/bin/git-st b/bin/git-st index a982342..764d628 100755 --- a/bin/git-st +++ b/bin/git-st @@ -1,7 +1,10 @@ #!/usr/bin/env bash -git branchless smartlog || true -printf '\n' +if git branchless query HEAD >/dev/null 2>&1; then + printf '\n ● \e[1m' + git branchless query HEAD + printf '\e[2;38;5;242m%*s\e[0m\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' '-' +fi awk -vOFS='' ' NR==FNR { @@ -27,5 +30,7 @@ awk -vOFS='' ' } } ' \ - <(git diff --color --stat=$(($(tput cols) - 3)) HEAD | sed '$d; s/^ //')\ - <(git -c color.status=always status -sb) + <(git diff --color --stat=$(($(tput cols) - 3)) HEAD | sed '$d; s/^ //') \ + <(git -c color.status=always status -sb) + +printf '\n'