From 9c73bfd7d407690ce7c17d689e8b033c90167e46 Mon Sep 17 00:00:00 2001 From: Daniel Lynn Date: Mon, 13 Mar 2023 17:16:23 -0500 Subject: [PATCH] git status on git repo entry --- zshrc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/zshrc b/zshrc index 03aad33..debbfbd 100644 --- a/zshrc +++ b/zshrc @@ -120,6 +120,19 @@ if (( $+commands[zellij] )); then fi fi +# git +if (( $+commands[git] )); then + git_chpwd_hook() { + if [[ -d ".git" ]]; then + git status + fi + } + + chpwd_functions+=( git_chpwd_hook ) + + git_chpwd_hook +fi + # gh if (( $+commands[gh] )); then gh_chpwd_hook() {