Make watch git status always use color

This commit is contained in:
2026-06-17 13:53:53 +01:00
parent 512e535ff5
commit c1293b1914

View File

@@ -142,6 +142,16 @@ elif which batcat &> /dev/null; then
} }
fi fi
# Wrap watch to colorize 'watch git status', otherwise pass through to the real
# watch command.
watch() {
if [ "git status" = "$*" ]; then
command watch --color -n 2 'git -c color.status=always status'
else
command watch "$@"
fi
}
if which docker-machine &> /dev/null; then if which docker-machine &> /dev/null; then
# Wrap the docker command to print a message if a docker-machine is not # Wrap the docker command to print a message if a docker-machine is not
# running, rather than just stating it can not find it's socket. # running, rather than just stating it can not find it's socket.