Bladeren bron

Read lastrv in one step, now that the file will exist

Alois Mahdal 10 jaren geleden
bovenliggende
commit
f76dcac790
1 gewijzigde bestanden met toevoegingen van 1 en 2 verwijderingen
  1. 1
    2
      dotfiles/bash/post.bashrc

+ 1
- 2
dotfiles/bash/post.bashrc Bestand weergeven

10
 
10
 
11
 __make_ps1d() {
11
 __make_ps1d() {
12
     local rvfile="/var/tmp/bash-rv/$$.lastrv"
12
     local rvfile="/var/tmp/bash-rv/$$.lastrv"
13
-    local lastrv
14
-    read lastrv <<<$(cat $rvfile 2>/dev/null)
13
+    local lastrv=$(cat $rvfile)
15
     local do_rm=false
14
     local do_rm=false
16
     test "$1" == "-r" && do_rm=true
15
     test "$1" == "-r" && do_rm=true
17
     if [ 0$lastrv -gt 0 ];
16
     if [ 0$lastrv -gt 0 ];