diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-01-15 15:53:31 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-01-15 15:54:28 -0800 |
| commit | bf37295faeb9535c56671f4b2050260e1b88cd32 (patch) | |
| tree | d544b68bca8c5bdf0926cc20a12f925c1761cfda /lib/progressbar | |
| parent | ef70abe4b7ed8d04574ab24ea4fd74fe2a64221f (diff) | |
Updating to v6.15, which includes "external (...)" instead of separate
'externally' versions of stuff, and some auto-formatting.
Diffstat (limited to 'lib/progressbar')
| -rw-r--r-- | lib/progressbar/init.nom | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/lib/progressbar/init.nom b/lib/progressbar/init.nom index a7ff5aa..5da9360 100644 --- a/lib/progressbar/init.nom +++ b/lib/progressbar/init.nom @@ -1,16 +1,12 @@ +#!/usr/bin/env nomsu -V6.15.13.8 # A progress bar - -externally ($x / $w progress bar) means: - $x = ($x clamped between 0 and $w) - $bits = [" ", "▏", "▎", "▍", "▌", "▋", "▊", "▉", "█"] - $middle = - "" if ($x == $w) else - $bits.(1 + (floor ((#$bits) * ($x mod 1)))) - return (" - \027[32;40m\($bits, last, rep (floor $x))\$middle\ - ..\(" ", rep ($w - ((floor $x) + 1)))\027[0m - ") - -externally ($w wide $ progress bar) means - ($ * $w) / $w progress bar +external: + ($x / $w progress bar) means: + $x = ($x clamped between 0 and $w) + $bits = [" ", "▏", "▎", "▍", "▌", "▋", "▊", "▉", "█"] + $middle = ("" if ($x == $w) else $bits.(1 + (floor ((#$bits) * ($x mod 1))))) + return (" + \027[32;40m\($bits, last, rep (floor $x))\$middle\(" ", rep ($w - ((floor $x) + 1)))\027[0m + ") + ($w wide $ progress bar) means (($ * $w) / $w progress bar) |
