mirror of
https://gitea.zaclys.com/yannic/dotfiles.git
synced 2026-06-15 11:11:57 +02:00
Git fetch after each cd
This commit is contained in:
@@ -64,6 +64,15 @@ if command -v tig &>/dev/null; then
|
|||||||
alias tiga='tig --all'
|
alias tiga='tig --all'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Function to run after every 'cd' command
|
||||||
|
chpwd() {
|
||||||
|
# Check if the current directory is a Git repository
|
||||||
|
if git rev-parse --is-inside-work-tree 2>/dev/null; then
|
||||||
|
echo "Fetching latest changes from remote..."
|
||||||
|
git fetch
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Editor
|
# Editor
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user