๐Ÿ”’ Backup for my config files
dotfiles
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add jj description to the `fish_right_prompt`

Kacaii b9911418 8102f723

+14 -5
+1 -2
.config/fish/functions/fish_prompt.fish
··· 16 16 set icon (set_color yellow) "๎˜†" (set_color normal) 17 17 end 18 18 19 - echo -s $icon " " $working_directory 20 - echo -ns "๎ญฐ " 19 + echo -ns $icon " " $working_directory " ๎ญฐ " 21 20 end
+13 -3
.config/fish/functions/fish_right_prompt.fish
··· 1 1 function fish_right_prompt 2 2 set -l vcs_color normal 3 3 set -l vcs_icon "" 4 + set -l vcs_text "" 5 + set -l jj_description "" 4 6 set -l code_forge "" 5 7 6 8 # ๏‚ JJ Root ··· 15 17 if test -n "$jj_root_dir" 16 18 set vcs_color blue 17 19 set vcs_icon (set_color $vcs_color ) "๏‚ " ( set_color normal ) 20 + set jj_description "$(jj log -R (jj root) -r @- -T "description" --no-graph)" 18 21 else if test -n "$git_root_dir" 19 22 set vcs_color red 20 23 set vcs_icon (set_color $vcs_color ) "๎™ " ( set_color normal ) 21 24 end 22 25 23 - # Code forge 26 + # Code forge 24 27 if test -e "$jj_root_dir/.tangled" 25 28 set code_forge "๓ฐณ† " 26 29 else if test -e "$jj_root_dir/.github" ··· 28 31 end 29 32 30 33 # Git prompt 31 - set -l commit_hash \ 34 + set -l git_commit_hash \ 32 35 (set_color $vcs_color) (fish_git_prompt) (set_color normal) 33 36 34 - echo -ns $code_forge $vcs_icon $commit_hash 37 + # Vcs text 38 + if test -n "$jj_root_dir"; and test -n "$jj_description" 39 + set vcs_text $jj_description 40 + else if test -n "$git_root_dir" 41 + set vcs_text $git_commit_hash 42 + end 43 + 44 + echo -ns $code_forge $vcs_icon $vcs_text 35 45 end