mirror of
https://gitea.zaclys.com/yannic/dotfiles.git
synced 2026-05-23 19:37:28 +02:00
Share project git fetch b/w ZSH and SESH
This commit is contained in:
+1
-13
@@ -66,21 +66,9 @@ if command -v tig &>/dev/null; then
|
||||
fi
|
||||
|
||||
chpwd() {
|
||||
# Is this directory inside a git repo?
|
||||
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
||||
|
||||
# Are we at the repo root? (prefix empty = root)
|
||||
|
||||
if [ -z "$(git rev-parse --show-prefix)" ]; then
|
||||
echo "Fetching latest changes from remote..."
|
||||
git fetch
|
||||
fi
|
||||
|
||||
fi
|
||||
project_git_fetch
|
||||
}
|
||||
|
||||
alias f='git fetch'
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Editor
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env zsh
|
||||
# Is this directory inside a git repo?
|
||||
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
||||
# Are we at the repo root? (prefix empty = root)
|
||||
if [ -z "$(git rev-parse --show-prefix)" ]; then
|
||||
echo "Fetching latest changes from remote..."
|
||||
git fetch
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user