Skip to content
This repository was archived by the owner on Jul 20, 2020. It is now read-only.
This repository was 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

@xxjapp

Description

@xxjapp

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions