# File lib/nanoc/cli/commands/compile.rb, line 229 def start_filter_progress(rep, filter_name) # Only show progress on terminals return if !$stdout.tty? @progress_thread = Thread.new do delay = 1.0 step = 0 text = " running #{filter_name} filter… " loop do if Thread.current[:stopped] # Clear if delay < 0.1 $stdout.print ' ' * (text.length + 3) + "\r" end break end # Show progress if delay < 0.1 $stdout.print text + %w( | / - \\ )[step] + "\r" step = (step + 1) % 4 end sleep 0.1 delay -= 0.1 end end end