tMerge pull request #28 from davinerd/feat_issue_1 - tomb - the crypto undertaker
HTML git clone git://parazyd.org/tomb.git
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit a73e0a351902d8f2bbc2558220fd6f335f867b45
DIR parent 938cb01af0194ea3d3e66a2632fffcb92f2523cd
HTML Author: Jaromil <jaromil@dyne.org>
Date: Fri, 19 Aug 2011 06:31:16 -0700
Merge pull request #28 from davinerd/feat_issue_1
we'll print a warning on 'list' if the tomb is almost full
Diffstat:
M src/tomb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
DIR diff --git a/src/tomb b/src/tomb
t@@ -1034,7 +1034,7 @@ list_tombs() {
tombused=${ts[(ws:;:)2]}
tombavail=${ts[(ws:;:)3]}
tombpercent=${ts[(ws:;:)4]}
-
+ tombp=${tombpercent%%%}
tombsince=`date --date=@${mapper[(ws:.:)3]} +%c`
# breaking up such strings is good for translation
t@@ -1054,6 +1054,10 @@ list_tombs() {
print -n "$fg_no_bold[white] free ("
print -n "$fg_bold[white]$tombpercent"
print "$fg_no_bold[white] full)"
+
+ if [[ ${tombp} -ge 90 ]]; then
+ error "Your tomb is almost full!"
+ fi
print -n "$fg_no_bold[green]$tombname"
print -n "$fg_no_bold[white] open since "