1
Fork 0
mirror of https://github.com/RGBCube/random-scripts synced 2025-05-14 11:04:59 +00:00

Make lottery.nu more readable

This commit is contained in:
RGBCube 2024-03-08 14:10:18 +03:00
parent 08032e38c7
commit 2cb5858816
No known key found for this signature in database

View file

@ -2,17 +2,17 @@
print -n $"Lottery number: (ansi red) " print -n $"Lottery number: (ansi red) "
(random int 0..1500 | into string) random int 0..1500
| into string
| split chars | split chars
| each {|n| | each {|n|
for $i in 0..($n | into int) { for $i in 0..($n | into int) {
print -n "\b" print --no-newline $"\b($i)"
print -n $i
sleep 300ms sleep 300ms
} }
print -n $n print --no-newline $n
} }
print "\b " print "\b "