From 1d2dbc0df2c724eb9e3352298a8b76b1ae35b978 Mon Sep 17 00:00:00 2001 From: Marty Oehme <marty.oehme@gmail.com> Date: Sun, 23 Feb 2025 23:21:23 +0100 Subject: [PATCH] git: Update basic git-bug aliases Update for newer git-bug versions (compiled from main trunk not tags). --- vcs/git/config/sh/alias.d/git.sh | 33 +++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/vcs/git/config/sh/alias.d/git.sh b/vcs/git/config/sh/alias.d/git.sh index 29679c3..b4153f6 100644 --- a/vcs/git/config/sh/alias.d/git.sh +++ b/vcs/git/config/sh/alias.d/git.sh @@ -98,21 +98,28 @@ else 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' + # POSIX-compliant version of . <(cmd) substitution + # shellcheck source=/dev/null # but shellcheck can't access + git-bug completion zsh | . /dev/fd/0 - alias gba='git bug add' - alias gbm='git bug comment add' - alias gbc='git bug status close' + alias gbt='git-bug termui' + alias gb="git-bug bug" + alias gbw="git-bug bug show" - alias gbp='git bug push' - alias gbl='git bug pull' + alias gbn='git-bug bug new' + alias gbm='git-bug bug comment new' + alias gbte='git-bug bug title edit' + + # TODO: Implement toggle function + # grab current status and then open or close accordingly + alias gbo='git-bug bug status close' + + alias gbp='git-bug push' + alias gbl='git-bug pull' + + alias gbu='git-bug user' # list users + # show primary user info + alias gbU='git-bug user user "$(git-bug user | cut -d" " -f1 | head -n1)"' fi unset -v git_version