You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Elliot Miller (Jira)" <ji...@apache.org> on 2020/07/24 16:52:00 UTC
[jira] [Created] (HBASE-24771) Investigate Potential to Use Ruby's
Help Functionality in Shell
Elliot Miller created HBASE-24771:
-------------------------------------
Summary: Investigate Potential to Use Ruby's Help Functionality in Shell
Key: HBASE-24771
URL: https://issues.apache.org/jira/browse/HBASE-24771
Project: HBase
Issue Type: Task
Components: shell
Affects Versions: 2.3.0, 3.0.0-alpha-1
Reporter: Elliot Miller
Ruby and Interactive Ruby (irb) have functionality for helping users (via introspection). It would be interesting to see if we can hook into this for hbase-shell.
* Ruby has a built in method called "ri" which lets users explore help text for modules, classes, and methods from RDocs.
** [https://ruby.github.io/rdoc/RI_rdoc.html]
* Interactive ruby has a method called "irb_help" which gets patched onto the main Object as "help" (except in our shell, where we have our own help method). Under the hood, it uses {{Ri}}.
** [https://docs.ruby-lang.org/en/2.3.0/IRB/ExtendCommandBundle.html]
** [https://github.com/ruby/irb/blob/66c4eab4e71b47f3c78ed68727c0bd1c3897591d/lib/irb/cmd/help.rb]
At the moment, {{irb_help}}/{{ri}} knows nothing about the HBase shell commands
{code:java}
hbase> irb_help
Enter the method name you want to look up.
You can use tab to autocomplete.
Enter a blank line to exit.
>> list
Nothing known about .list
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)