blob: 8037fc421ed77d516dee0b744d9c6996e500da83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
function fish_prompt
set -l fail $status
tput bold
echo -ne "["
set_color magenta
echo -ne (pwd) | sed 's#.*/\(.*\)/\(.*\)#\1/\2#'
#echo -ne (pwd) | sed 's#.*/\(.*\)#\1#'
set_color normal
tput bold
echo -ne "]("
set_color -o cyan
echo -ne (date "+%y.%m.%d %Hh%M")
set_color normal
tput bold
echo -ne ")"
set_color normal
vcs_string
if [ $fail = 0 ];
set_color -o green;
else
set_color -o red;
end;
if test (id -u) -eq 0;
echo -ne "\# "
else
echo -ne "\$ "
end
set_color normal
end
|