From 3faab44f666cd10137eae3d34b8c55776ef54f09 Mon Sep 17 00:00:00 2001 From: Carlos de Paula Date: Mon, 8 Mar 2021 20:07:54 -0300 Subject: [PATCH] Use argument to create new branch on gcb --- forgit.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/forgit.plugin.zsh b/forgit.plugin.zsh index 94f75fd..8bad968 100755 --- a/forgit.plugin.zsh +++ b/forgit.plugin.zsh @@ -184,6 +184,7 @@ forgit::rebase() { forgit::checkout::branch() { forgit::inside_work_tree || return 1 + [[ $# -ne 0 ]] && { git checkout -b "$*"; return $?; } local cmd preview opts cmd="git branch --color=always --verbose --all --format=\"%(if:equals=HEAD)%(refname:strip=3)%(then)%(else)%(refname:short)%(end)\" $* $forgit_emojify | sed '/^$/d'" preview="git log {} --graph --pretty=format:'%C(auto)%h%d %s %C(black)%C(bold)%cr%Creset' --color=always --abbrev-commit --date=relative"