watson-ruby icon indicating copy to clipboard operation
watson-ruby copied to clipboard

Way of calling a native Ruby less? [lib/watson/printer.rb]

Open nhmood opened this issue 11 years ago • 1 comments

filename : lib/watson/printer.rb line # : 131 tag : review md5 : bd28c51d7b384df0b16b241866680537

            # [review] - Way of calling a native Ruby less?
            system("less #{ @config.tmp_file }")
            debug_print "File displayed with less, now deleting...\n"
            File.delete(@config.tmp_file)
        end
            return true
    end
            ###########################################################
    # Custom color print for member call
    # Allows not only for custom color printing but writing to file vs STDOUT
    def cprint (msg = "", color = "")
            # Identify method entry
        debug_print "#{ self } : #{ __method__ }\n"

nhmood avatar Nov 21 '13 16:11 nhmood

Probably, although you will rewrite, I write an information down for everybody until then.

Watson warns as following in my environment.

$ ./bin/watson
".watsonresults" may be a binary file.  See it anyway?

In the case of using less, -R as it's option is required. Please execute this, when an error occured.

export LESS="-R"

alpaca-tc avatar Nov 22 '13 05:11 alpaca-tc