tomb

the crypto undertaker
git clone git://parazyd.org/tomb.git
Log | Files | Refs | README | LICENSE

commit a73e0a351902d8f2bbc2558220fd6f335f867b45
parent 938cb01af0194ea3d3e66a2632fffcb92f2523cd
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:
Msrc/tomb | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/tomb b/src/tomb @@ -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 @@ -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 "