From 064275111d397c3b7e960686cfff24e6f146b2f1 Mon Sep 17 00:00:00 2001 From: Laxman Goswami Date: Tue, 9 Feb 2021 10:44:23 +0530 Subject: [PATCH] HBASE-24772 Use GetoptLong or OptionParser in hbase-shell (#2918) Signed-off-by: Viraj Jasani Signed-off-by: stack (cherry picked from commit 1c64049158fcb3295156f00ae885f5cbbd030687) --- 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 4873bf840d0f..855ff4a74307 100644 --- a/hbase-shell/src/main/ruby/jar-bootstrap.rb +++ b/hbase-shell/src/main/ruby/jar-bootstrap.rb @@ -42,6 +42,7 @@ require 'irb/completion' end 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 @@ -52,11 +53,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 = <