Explorar el Código

Fix regression from inclusion of real escapes

Inclusion of "real" \033 seemed to work but confused readline when
working with long history lines
Alois Mahdal hace 11 años
padre
commit
b7ddf51f79
Se han modificado 1 ficheros con 5 adiciones y 8 borrados
  1. 5
    8
      dotfiles/bash/post.bashrc

+ 5
- 8
dotfiles/bash/post.bashrc Ver fichero

@@ -10,14 +10,11 @@
10 10
 
11 11
 __make_ps1d() {
12 12
     lastrv=$(cat /var/tmp/bash-rv/$$.lastrv)
13
-    if [ $lastrv -gt 126 ];
13
+    if [ $lastrv -gt 0 ];
14 14
     then
15
-        echo " \$"
16
-    elif [ $lastrv -gt 0 ];
17
-    then
18
-        echo " \$"
15
+        echo "$lastrv"
19 16
     else
20
-        echo " \$"
17
+        echo ""
21 18
     fi
22 19
 }
23 20
 
@@ -35,8 +32,8 @@ make_ps1() {
35 32
     ps1G='$(__git_ps1 "(%s)")';
36 33
     ps1g="$green$ps1G$normal";
37 34
     ps1D='$(__make_ps1d $?)';
38
-    ps1d="$ps1D";
39
-    echo "$svrc$ps1u@$ps1h:$ps1w$ps1g$ps1d$normal ";
35
+    ps1d="$red$ps1D$normal";
36
+    echo "$svrc$ps1u@$ps1h:$ps1w$ps1g$ps1d\$ ";
40 37
 }
41 38
 
42 39
 make_ps2() {