From 2e9a8ffc4c48d435adfe56523558ab17ed4a8db9 Mon Sep 17 00:00:00 2001 From: Laxman Goswami Date: Mon, 1 Feb 2021 15:24:46 +0530 Subject: [PATCH] HBASE-24772 Use GetoptLong or OptionParser in hbase-shell --- hbase-shell/src/main/ruby/jar-bootstrap.rb | 59 ++++++++++++---------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/hbase-shell/src/main/ruby/jar-bootstrap.rb b/hbase-shell/src/main/ruby/jar-bootstrap.rb index ef3727d3ba3f..03dba743b3c7 100644 --- a/hbase-shell/src/main/ruby/jar-bootstrap.rb +++ b/hbase-shell/src/main/ruby/jar-bootstrap.rb @@ -40,6 +40,7 @@ # Some goodies for hirb. Should these be left up to the user's discretion? require 'irb/completion' require 'pathname' +require 'getoptlong' # Add the directory names in hbase.jruby.sources commandline option # to the ruby load path so I can load up my HBase ruby modules @@ -50,11 +51,6 @@ $LOAD_PATH.unshift Pathname.new(sources) end -# -# FIXME: Switch args processing to getopt -# -# See if there are args for this shell. If any, read and then strip from ARGV -# so they don't go through to irb. Output shell 'usage' if user types '--help' cmdline_help = <