diff --git a/UnicodePlot.html b/UnicodePlot.html index 861771a..2aac0db 100644 --- a/UnicodePlot.html +++ b/UnicodePlot.html @@ -241,7 +241,7 @@
diff --git a/YouPlot.html b/YouPlot.html index f6a9d05..e3e6512 100644 --- a/YouPlot.html +++ b/YouPlot.html @@ -296,7 +296,7 @@ diff --git a/YouPlot/Backends.html b/YouPlot/Backends.html index c4351a5..c9ae393 100644 --- a/YouPlot/Backends.html +++ b/YouPlot/Backends.html @@ -118,7 +118,7 @@ diff --git a/YouPlot/Backends/Processing.html b/YouPlot/Backends/Processing.html index 37567e5..3fde3f6 100644 --- a/YouPlot/Backends/Processing.html +++ b/YouPlot/Backends/Processing.html @@ -208,7 +208,7 @@ diff --git a/YouPlot/Backends/UnicodePlot.html b/YouPlot/Backends/UnicodePlot.html index 50a8e7b..17af7e4 100644 --- a/YouPlot/Backends/UnicodePlot.html +++ b/YouPlot/Backends/UnicodePlot.html @@ -1070,7 +1070,7 @@ diff --git a/YouPlot/Backends/UnicodePlot/Error.html b/YouPlot/Backends/UnicodePlot/Error.html index d904a29..19db539 100644 --- a/YouPlot/Backends/UnicodePlot/Error.html +++ b/YouPlot/Backends/UnicodePlot/Error.html @@ -114,7 +114,7 @@ diff --git a/YouPlot/Command.html b/YouPlot/Command.html index 8903dd2..c3807b7 100644 --- a/YouPlot/Command.html +++ b/YouPlot/Command.html @@ -803,7 +803,7 @@ diff --git a/YouPlot/DSV.html b/YouPlot/DSV.html index 08e4143..75ecb43 100644 --- a/YouPlot/DSV.html +++ b/YouPlot/DSV.html @@ -460,7 +460,7 @@ diff --git a/YouPlot/Data.html b/YouPlot/Data.html index 759bab3..28b8632 100644 --- a/YouPlot/Data.html +++ b/YouPlot/Data.html @@ -300,7 +300,7 @@ diff --git a/YouPlot/Options.html b/YouPlot/Options.html index 247f289..6445608 100644 --- a/YouPlot/Options.html +++ b/YouPlot/Options.html @@ -1103,7 +1103,7 @@ diff --git a/YouPlot/Parameters.html b/YouPlot/Parameters.html index d23f67c..6ccc5ff 100644 --- a/YouPlot/Parameters.html +++ b/YouPlot/Parameters.html @@ -1881,7 +1881,7 @@ diff --git a/YouPlot/Parser.html b/YouPlot/Parser.html index 7a8340b..3358e86 100644 --- a/YouPlot/Parser.html +++ b/YouPlot/Parser.html @@ -540,6 +540,28 @@ + + + + + +# File 'lib/youplot/parser.rb', line 164 @@ -1489,9 +1509,7 @@ # Help for the main parser is simple. # Simply show the banner above. main_parser.on('--help', 'print sub-command help menu') do - puts main_parser. - puts - exit if YouPlot.run_as_executable? + show_main_help end end
-255 -256 -257 -258 259 260 261 @@ -1600,10 +1614,17 @@ 338 339 340 -341+341 +342 +343 +344 +345 +346 +347 +348
# File 'lib/youplot/parser.rb', line 255 +# File 'lib/youplot/parser.rb', line 259 def create_sub_parser @sub_parser = create_base_parser @@ -1618,10 +1639,13 @@ case command # If you type only `uplot` in the terminal. + # Output help to standard error output. when nil - warn main_parser. - warn "\n" - exit 1 if YouPlot.run_as_executable? + show_main_help($stderr) + + # Output help to standard output. + when :help + show_main_help when :barplot, :bar sub_parser_add_symbol @@ -1730,11 +1754,11 @@ def find_config_file config_file_candidate_paths.each do |file| path = File.(file) - if File.exist?(path) - @config_file = path - ENV['MYYOUPLOTRC'] = path - return @config_file - end + next unless File.exist?(path) + + @config_file = path + ENV['MYYOUPLOTRC'] = path + return @config_file end nil end@@ -1758,13 +1782,6 @@-343 -344 -345 -346 -347 -348 -349 350 351 352 @@ -1774,10 +1791,17 @@ 356 357 358 -359+359 +360 +361 +362 +363 +364 +365 +366
# File 'lib/youplot/parser.rb', line 343 +# File 'lib/youplot/parser.rb', line 350 def (argv = ARGV) begin @@ -1831,6 +1855,40 @@
+ + + +199 +200 +201 +202 +203+ |
+
+ # File 'lib/youplot/parser.rb', line 199 + +def show_main_help(out = $stdout) + out.puts main_parser. + out.puts + exit if YouPlot.run_as_executable? +end+ |
+
-214 -215 -216 -217 218 -219+219 +220 +221 +222 +223
# File 'lib/youplot/parser.rb', line 214 +# File 'lib/youplot/parser.rb', line 218 def sub_parser_add_canvas canvas_types = UnicodePlot::Canvas::CANVAS_CLASS_MAP.keys.join(', ') @@ -1884,16 +1942,16 @@-239 -240 -241 -242 243 244 -245+245 +246 +247 +248 +249
# File 'lib/youplot/parser.rb', line 239 +# File 'lib/youplot/parser.rb', line 243 def sub_parser_add_fmt_xyxy sub_parser.on_head('--fmt STR', String, @@ -1922,16 +1980,16 @@-247 -248 -249 -250 251 252 -253+253 +254 +255 +256 +257
# File 'lib/youplot/parser.rb', line 247 +# File 'lib/youplot/parser.rb', line 251 def sub_parser_add_fmt_yx sub_parser.on_head('--fmt STR', String, @@ -1960,14 +2018,14 @@-233 -234 -235 -236 -237+237 +238 +239 +240 +241
# File 'lib/youplot/parser.rb', line 233 +# File 'lib/youplot/parser.rb', line 237 def sub_parser_add_grid sub_parser.on_head('--[no-]grid', TrueClass, 'draws grid-lines at the origin') do |v| @@ -1994,14 +2052,14 @@-201 -202 -203 -204 -205+205 +206 +207 +208 +209
# File 'lib/youplot/parser.rb', line 201 +# File 'lib/youplot/parser.rb', line 205 def sub_parser_add_symbol sub_parser.on_head('--symbol STR', String, 'character to be used to plot the bars') do |v| @@ -2028,14 +2086,14 @@-221 -222 -223 -224 -225+225 +226 +227 +228 +229
# File 'lib/youplot/parser.rb', line 221 +# File 'lib/youplot/parser.rb', line 225 def sub_parser_add_xlim sub_parser.on_head('--xlim FLOAT,FLOAT', Array, 'plotting range for the x coordinate') do |v| @@ -2062,15 +2120,15 @@-207 -208 -209 -210 211 -212+212 +213 +214 +215 +216
# File 'lib/youplot/parser.rb', line 207 +# File 'lib/youplot/parser.rb', line 211 def sub_parser_add_xscale = UnicodePlot::ValueTransformer::PREDEFINED_TRANSFORM_FUNCTIONS.keys.join(', ') @@ -2098,14 +2156,14 @@-227 -228 -229 -230 -231+231 +232 +233 +234 +235
# File 'lib/youplot/parser.rb', line 227 +# File 'lib/youplot/parser.rb', line 231 def sub_parser_add_ylim sub_parser.on_head('--ylim FLOAT,FLOAT', Array, 'plotting range for the y coordinate') do |v| @@ -2122,7 +2180,7 @@ diff --git a/YouPlot/Parser/Error.html b/YouPlot/Parser/Error.html index ce4b4d8..b6a2f88 100644 --- a/YouPlot/Parser/Error.html +++ b/YouPlot/Parser/Error.html @@ -114,7 +114,7 @@ diff --git a/_index.html b/_index.html index 0686661..f3674ce 100644 --- a/_index.html +++ b/_index.html @@ -238,7 +238,7 @@ diff --git a/file.README.html b/file.README.html index 701b32c..0f20590 100644 --- a/file.README.html +++ b/file.README.html @@ -397,7 +397,7 @@ If so, please feel free to contact us. diff --git a/index.html b/index.html index d0fcb84..c71d220 100644 --- a/index.html +++ b/index.html @@ -397,7 +397,7 @@ If so, please feel free to contact us. diff --git a/method_list.html b/method_list.html index 2734049..02949fe 100644 --- a/method_list.html +++ b/method_list.html @@ -582,13 +582,21 @@