···11function fish_right_prompt
22 set -l vcs_color normal
33 set -l vcs_icon ""
44+ set -l vcs_text ""
55+ set -l jj_description ""
46 set -l code_forge ""
5768 # ๏ JJ Root
···1517 if test -n "$jj_root_dir"
1618 set vcs_color blue
1719 set vcs_icon (set_color $vcs_color ) "๏ " ( set_color normal )
2020+ set jj_description "$(jj log -R (jj root) -r @- -T "description" --no-graph)"
1821 else if test -n "$git_root_dir"
1922 set vcs_color red
2023 set vcs_icon (set_color $vcs_color ) "๎ " ( set_color normal )
2124 end
22252323- # Code forge
2626+ # Code forge
2427 if test -e "$jj_root_dir/.tangled"
2528 set code_forge "๓ฐณ "
2629 else if test -e "$jj_root_dir/.github"
···2831 end
29323033 # Git prompt
3131- set -l commit_hash \
3434+ set -l git_commit_hash \
3235 (set_color $vcs_color) (fish_git_prompt) (set_color normal)
33363434- echo -ns $code_forge $vcs_icon $commit_hash
3737+ # Vcs text
3838+ if test -n "$jj_root_dir"; and test -n "$jj_description"
3939+ set vcs_text $jj_description
4040+ else if test -n "$git_root_dir"
4141+ set vcs_text $git_commit_hash
4242+ end
4343+4444+ echo -ns $code_forge $vcs_icon $vcs_text
3545end