From 789ca8a41c2e5f142929c9e6c6a409f337cc1b4f Mon Sep 17 00:00:00 2001 From: Uyanide Date: Tue, 26 May 2026 14:57:44 +0200 Subject: [PATCH] update --- config/shell/.config/zsh/conf.d/60-alias.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/shell/.config/zsh/conf.d/60-alias.zsh b/config/shell/.config/zsh/conf.d/60-alias.zsh index 1ef6da3..d40400c 100644 --- a/config/shell/.config/zsh/conf.d/60-alias.zsh +++ b/config/shell/.config/zsh/conf.d/60-alias.zsh @@ -223,8 +223,12 @@ if (( $+commands[jj] )); then } jjp() { + default_branch() { + git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's|.*/||' \ + || git remote show origin | awk '/HEAD branch/ {print $NF}' || echo "master" + } local branch pos - branch=${1:-master} + branch=${1:-$(default_branch)} pos=${2:-@-} jj bookmark move "$branch" --to "$pos" jj git push