Update my zshrc with additional files, it was getting unruly, despite my hope with plugins/etc

This commit is contained in:
2024-05-20 19:57:39 -04:00
parent e6f9b29f3b
commit 9a4a2c951e
7 changed files with 123 additions and 86 deletions

16
zsh/lib/git.zsh Normal file
View File

@ -0,0 +1,16 @@
function git-parent-branch {
git show-branch -a \
| grep '\*' \
| grep -v `git-rev-parse --abbrev-ref HEAD` \
| head -n1 \
| sed 's/.*\[\(.*\)\].*/\1/' \
| sed 's/[\^~].*//'
}
alias gpb=git-parent-branch
# Use this to define the git lg alias
function define_gitlg {
git config --global alias.lg log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --abbrev-commit
}