comparison dot_config/private_fish/functions/fish_right_prompt.fish @ 1038:6ab26ddbf78d

feat: add fish shell
author Zeger Van de Vannet <zeger@vandevan.net>
date Fri, 26 Apr 2024 18:43:22 +0200
parents
children
comparison
equal deleted inserted replaced
1037:38b8060cdf24 1038:6ab26ddbf78d
1 function fish_right_prompt
2 if not command -sq hg
3 return 1
4 end
5
6 set -l root (fish_print_hg_root)
7 or return 1
8
9 # In stead of running this command, cat the branch and topic name from the .hg folder
10 # echo (set_color yellow)(HGPLAIN= HGRCPATH= hg --config extensions.topic= log -r 'wdir()' --template='{fqbn}' 2>/dev/null) (set_color normal)
11 set -l branch (cat $root/branch 2>/dev/null; or echo default)
12 if set -l topic (cat $root/topic 2>/dev/null)
13 set branch "$branch//$topic"
14 end
15 # TODO: add topic namespace when available
16
17 echo (set_color green)"$branch "(set_color normal)
18 end