2022-05-17 21:37:19 +03:00
|
|
|
let blocks = ["▏" "▎" "▍" "▌" "▋" "▊" "▉" "█"]
|
|
|
|
let pb_size = 25
|
|
|
|
ansi cursor_off
|
|
|
|
1..<$pb_size | each { |cur_size|
|
|
|
|
0..7 | each { |tick|
|
|
|
|
let idx = ($tick mod 8)
|
|
|
|
let cur_block = ($blocks | get $idx)
|
2023-03-03 00:54:42 +03:00
|
|
|
print -n $"(ansi -e '1000D')($cur_block | fill -c $blocks.7 -w $cur_size -a r)"
|
2022-10-24 04:23:20 +03:00
|
|
|
sleep 20ms
|
2022-05-17 21:37:19 +03:00
|
|
|
}
|
2022-10-24 04:23:20 +03:00
|
|
|
print -n $"(ansi -e '1000D')"
|
2022-05-17 21:37:19 +03:00
|
|
|
}
|
2023-03-03 00:54:42 +03:00
|
|
|
print $"($blocks.7 | fill -c $blocks.7 -w $pb_size -a r)"
|
2022-05-17 21:37:19 +03:00
|
|
|
'Done'
|
|
|
|
ansi cursor_on
|
|
|
|
|