git: fancy git-st status script

This commit is contained in:
Daniel Lundin 2023-12-28 11:27:46 +01:00
parent 7540f0540d
commit ed3b8eeae7

View file

@ -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'