From 23bb767afe3fe7945b202466c1bd6abefbfb1ec5 Mon Sep 17 00:00:00 2001 From: kojix2 <2xijok@gmail.com> Date: Tue, 8 Jun 2021 17:44:37 +0900 Subject: [PATCH] Revert "Accept hyphens as an output option" This reverts commit dfc027d972b24b33356a2efa2879bfcc5668b502. No need to change. --- lib/youplot/parser.rb | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/youplot/parser.rb b/lib/youplot/parser.rb index 05c56e7..d8691e4 100644 --- a/lib/youplot/parser.rb +++ b/lib/youplot/parser.rb @@ -38,17 +38,13 @@ module YouPlot parser.on_tail('') # Add a blank line at the end parser.separator('') parser.on('Common options:') - parser.on('-o', '--output [FILE]', 'file to output plots to [stdout]', - 'If no option is specified, plot will print to stderr') do |v| - # uplot bar -o | foo - # uplot bar -o - -w 30 | foo - options[:output] = v.nil? || v == '-' ? $stdout : v - end parser.on('-O', '--pass [FILE]', 'file to output input data to [stdout]', 'for inserting YouPlot in the middle of Unix pipes') do |v| - # | uplot bar -O | foo - # | uplot bar -O - -w 30 | foo - options[:pass] = v.nil? || v == '-' ? $stdout : v + options[:pass] = v || $stdout + end + parser.on('-o', '--output [FILE]', 'file to output plots to [stdout]', + 'If no option is specified, plot will print to stderr') do |v| + options[:output] = v || $stdout end parser.on('-d', '--delimiter DELIM', String, 'use DELIM instead of [TAB] for field delimiter') do |v| options[:delimiter] = v