Spinning rod animation/Text: Difference between revisions

Line 419:
def hide: "\(ESC)[?25l"; # hide the cursor
def restore: "\(ESC)[?25h"; # restore the cursor;
def a: "🌑", "🌒", "🌓", "🌔", "🌕", "🌖", "🌗", "🌘";
def a: "|/-\\";
 
hide,
"\(ESC)[2J\(ESC)[H", # clear, place cursor at top left corner
(range(0; $n // infinite) as $_
| range(0; 4)a as $ia
| pause(0.05)
| "\r\($a[$i:$i+1])" ),
restore;
 
2,479

edits