瀏覽代碼

Clean up return value file

Alois Mahdal 10 年之前
父節點
當前提交
b2850b307b
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. 3
    1
      dotfiles/bash/post.bashrc

+ 3
- 1
dotfiles/bash/post.bashrc 查看文件

@@ -9,13 +9,15 @@
9 9
 ### '''' ###
10 10
 
11 11
 __make_ps1d() {
12
-    lastrv=$(cat /var/tmp/bash-rv/$$.lastrv)
12
+    rvfile="/var/tmp/bash-rv/$$.lastrv"
13
+    lastrv=$(cat $rvfile)
13 14
     if [ $lastrv -gt 0 ];
14 15
     then
15 16
         echo "$lastrv"
16 17
     else
17 18
         echo ""
18 19
     fi
20
+    rm $rvfile
19 21
 }
20 22
 
21 23
 __save_rv() {