Skip to content
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.

want to work correctly with \r or \b in right message #6

Open
xxjapp opened this issue Sep 27, 2017 · 0 comments
Open

want to work correctly with \r or \b in right message #6

xxjapp opened this issue Sep 27, 2017 · 0 comments

Comments

@xxjapp
Copy link

xxjapp commented Sep 27, 2017

The following ruby script will output messages overwriting outputted messages in the same line.

------------------ test.rb ------------------

#!/usr/bin/env ruby
# encoding: utf-8
#

space = "                          "
print space

1.upto(30) { |x|
    print "[" + '*' * x + "]"
    sleep 0.2
    print "\b" * (x + 2)
}

puts

Execute

ruby test.rb 

will output like this

                      [****************]

and will dynamically become longer.

However, execute

ruby test.rb | gnomon --medium=1 --high=5 --real-time=100

will produce nothing but wait

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant