You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Shinichi Yamashita (JIRA)" <ji...@apache.org> on 2016/01/10 05:00:42 UTC

[jira] [Updated] (HIVE-12834) Fix to accept the arrow keys in BeeLine CLI

     [ https://issues.apache.org/jira/browse/HIVE-12834?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shinichi Yamashita updated HIVE-12834:
--------------------------------------
    Attachment: HIVE-12834.1.patch

There is the following statement in "bin/beeline".
{code}
if [[ ! $(ps -o stat= -p $$) =~ + ]]; then
{code}

I think this should be changed as follows.
{code}
if [[ ! $(ps -o stat= -p $$) =~ "+" ]]; then
{code}


> Fix to accept the arrow keys in BeeLine CLI
> -------------------------------------------
>
>                 Key: HIVE-12834
>                 URL: https://issues.apache.org/jira/browse/HIVE-12834
>             Project: Hive
>          Issue Type: Bug
>          Components: Beeline
>         Environment: CentOS 6.7
>            Reporter: Shinichi Yamashita
>            Assignee: Shinichi Yamashita
>         Attachments: HIVE-12834.1.patch
>
>
> BeeLine in the master doesn't accept the arrow keys as follows (e.g. ^[[A is up arrow key).
> {code}
> [root@hadoop ~]# beeline
> which: no hbase in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/hadoop/bin:/usr/local/hive/bin:/usr/pgsql-9.4/bin:/root/bin)
> Beeline version 2.1.0-SNAPSHOT by Apache Hive
> beeline> ^[[A^[[B^[[C^[[D
> {code}
> Because UnsupportedTerminal is set in the same way as background. we can check with the ps command.
> {code}
> [root@hadoop ~]# ps -ef | grep beeline
> root       5799   1433  1 12:05 pts/0    00:00:02 /usr/lib/jvm/java/bin/java -Xmx256m (snip) -Djline.terminal=jline.UnsupportedTerminal (snip) org.apache.hive.beeline.BeeLine
> {code}
> I think the HIVE-6758 affected this behavior. I will fix to accept the arrow keys.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)