···88 set -gx EDITOR nvim
99 set -gx XDG_CONFIG_HOME $HOME/.config
1010 set -gx TERM xterm-256color
1111+ set -gx JJ_DESCRIPTION ( get_jj_description )
11121213 # ๏ Config files
1314 set -g dotfiles $HOME/dotfiles
+1-1
.config/fish/functions/fish_right_prompt.fish
···1717 if test -n "$jj_root_dir"
1818 set vcs_color blue
1919 set vcs_icon (set_color $vcs_color ) "๏ " ( set_color normal )
2020- set jj_description "$(jj log -R $jj_root_dir -r @ -T "description" --no-graph)"
2020+ set jj_description ( get_jj_description )
2121 else if test -n "$git_root_dir"
2222 set vcs_color red
2323 set vcs_icon (set_color $vcs_color ) "๎ " ( set_color normal )
+11
.config/fish/functions/get_jj_description.fish
···11+function get_jj_description -d "Current commit description or empty string if none"
22+ set -l jj_root_dir ""
33+44+ command -q jj
55+ and set -l jj_root_dir ( jj root 2> /dev/null )
66+ and test -n "$jj_root_dir"
77+ and echo "$(jj log -R $jj_root_dir -r @ -T "description" --no-graph)"
88+99+ # Empty if it Fails
1010+ or echo ""
1111+end