From b0c5176f1e8d064ef69d0a5637410e489abaa859 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sun, 4 Feb 2024 21:25:21 +0100 Subject: [PATCH] git: Add git-bug quick access aliases --- git/.config/sh/alias.d/git.sh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/git/.config/sh/alias.d/git.sh b/git/.config/sh/alias.d/git.sh index 94df149..8062e3d 100644 --- a/git/.config/sh/alias.d/git.sh +++ b/git/.config/sh/alias.d/git.sh @@ -13,8 +13,6 @@ alias g='git' alias ga='git add' alias gaa='git add --all' alias gai='git add -i' -alias gb='git branch' -alias gbd='git branch -d' alias gc='git commit -v' alias gc!='git commit -v --amend' @@ -96,4 +94,22 @@ else alias gsta='git stash save' fi +if exist git-bug; then + gb() { + if [ "$#" -eq 1 ]; then + git bug show "$1" + else + git bug ls "$@" + fi + } + alias gbt='git bug termui' + + alias gba='git bug add' + alias gbm='git bug comment add' + alias gbc='git bug status close' + + alias gbp='git bug push' + alias gbl='git bug pull' +fi + unset -v git_version