git: Show bug description if bug id passed to gb
The alias `gb` will list all bugs (or allows to query for them) by default. But if only a single argument is provided, and that argument is a bug id then it shows the bug. This allows a nice workflow like: ```sh $ gb # -> returns list of bugs, pick one from it $ gb <bug-id> # -> returns detailed description of bug ```
This commit is contained in:
parent
5986206e51
commit
133910be08
1 changed files with 7 additions and 1 deletions
|
@ -9,7 +9,13 @@ fi
|
|||
git-bug completion zsh | . /dev/fd/0
|
||||
|
||||
alias gbt='git-bug termui'
|
||||
alias gb="git-bug bug"
|
||||
gb() {
|
||||
if [ "$#" -eq 1 ] && git-bug bug status "$1" >/dev/null 2>/dev/null; then
|
||||
git-bug bug show "$1"
|
||||
else
|
||||
git-bug bug "$@"
|
||||
fi
|
||||
}
|
||||
alias gbw="git-bug bug show"
|
||||
alias gbs="git-bug bug select"
|
||||
|
||||
|
|
Loading…
Reference in a new issue