Skip to content

Instantly share code, notes, and snippets.

@yunusemredilber
Created May 24, 2020 20:57
Show Gist options
  • Save yunusemredilber/88dcbc024d7aa1aa964eb6a84c8f517c to your computer and use it in GitHub Desktop.
Save yunusemredilber/88dcbc024d7aa1aa964eb6a84c8f517c to your computer and use it in GitHub Desktop.
Crystal termial/cli loading animation
require "colorize"
arr_loading = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]
i = 0
loop do
print "#{arr_loading[i % arr_loading.size]}\r".colorize(:light_magenta)
i += 1
sleep(0.1)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment