From c4c1236f9d412ece3f326d32f4f2158b4f6804d1 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Fri, 22 Nov 2024 17:08:41 -0600 Subject: [PATCH] improve jj segment --- home/private_dot_config/zsh/themes/dot_p10k.zsh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/home/private_dot_config/zsh/themes/dot_p10k.zsh b/home/private_dot_config/zsh/themes/dot_p10k.zsh index 3a6b5bb..5c30ac6 100644 --- a/home/private_dot_config/zsh/themes/dot_p10k.zsh +++ b/home/private_dot_config/zsh/themes/dot_p10k.zsh @@ -1669,16 +1669,15 @@ # how to make this work like git? _p9k_upglob '.jj' && return - local templ=' - concat( - separate(" ", + local template='concat(separate(" ", format_short_change_id_with_hidden_and_divergent_info(self), + bookmarks, tags, if(conflict, label("conflict", "conflict")), if(empty, label("empty", "(E)")), - if(description, description.first_line(),label(if(empty, "empty"), description_placeholder), - )))' + if(description, description.first_line(),"(no desc.)") + ))' - local jj_status="$(jj log -T "$templ" -n 1 --no-graph --color=always)" + local jj_status="$(jj log -T "$template" -r @ --no-graph --quiet --no-pager --color=always)" p10k segment -t "$jj_status" }