git: make gp great again

Signed-off-by: Michael Grote <michael.grote@dataport.de>
This commit is contained in:
Michael Grote 2024-09-16 09:43:47 +02:00
parent 502b9f8371
commit ec4c75bd09
3 changed files with 10 additions and 4 deletions

View file

@ -10,7 +10,3 @@ function ssh {
tmux rename-window "$(hostname -f)" tmux rename-window "$(hostname -f)"
fi fi
} }
function gp {
git pull "$@"
}

9
scripts/git_pull Executable file
View file

@ -0,0 +1,9 @@
#!/bin/bash
if [ -n "${TMUX}" ]; then
remotename=$(git remote -v | cut -f2 -d"@" | cut -f1 -d":" | head -n1)
tmux rename-window "SSH: $remotename"
fi
git pull
if [ -n "${TMUX}" ]; then
tmux rename-window "$(basename $(pwd))"
fi

1
scripts/gp Symbolic link
View file

@ -0,0 +1 @@
git_pull