From c40c59a21dd712f0003cd9fe295ff6a380dd82b5 Mon Sep 17 00:00:00 2001 From: kojix2 <2xijok@gmail.com> Date: Mon, 12 Oct 2020 17:10:25 +0900 Subject: [PATCH] Show message when No input data provided Thank you csvkit developers --- lib/uplot/command.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/uplot/command.rb b/lib/uplot/command.rb index 4106aa9..7628c6f 100644 --- a/lib/uplot/command.rb +++ b/lib/uplot/command.rb @@ -35,8 +35,14 @@ module Uplot exit end + watchman = Thread.new do + sleep(1) + warn 'No input file or piped data provided. Waiting for standard input:' + end + # Sometimes the input file does not end with a newline code. while (input = Kernel.gets(nil)) + watchman.kill input.freeze @raw_inputs << input @data = Preprocessing.input(input, delimiter, headers, transpose)