blob: 3b6e639ff0a59d2afd39d38e27de327ec63c4c81 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
function fish_prompt
set -l __last_command_exit_status $status
set -l cyan (set_color -o cyan)
set -l red (set_color -o red)
set -l green (set_color -o green)
set -l normal (set_color normal)
set -l marker_color "$green"
if test $__last_command_exit_status != 0
set marker_color "$red"
end
set -l marker "$marker_color" "δ"
if fish_is_root_user
set marker "$marker_color# "
end
set -l cwd $cyan (string join / (string split -r -m3 / (prompt_pwd))[-3..-1])
echo -n -s $marker ' ' $cwd $normal ' '
end
|