public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Per Bothner <per@bothner.com>
To: Andrea Bernardini <andrebask@gmail.com>, kawa@sourceware.org
Subject: Re: tab-completion implemented for Kawa
Date: Thu, 25 Feb 2016 23:51:00 -0000	[thread overview]
Message-ID: <56CF9386.6040001@bothner.com> (raw)
In-Reply-To: <CAPFJfsuKUjZSkKCZLTFUMybXpp6N4SMXqGerduNEsrhfnJ=J2g@mail.gmail.com>



On 02/25/2016 03:33 PM, Andrea Bernardini wrote:
> Hi Per,
> This is a very nice feature!

Thanks!
>
> BTW, something I miss in the Kawa REPL is some kind of history. I'm
> used to the bash shell, where you can use the up arrow key to get the
> previous executed commands. Currently pressing the arrow key in Kawa
> inserts a weird sequence of characters.

That what the arrow keys are supposed to send.  However, Java doesn't
have a portable pure-Java mechanism to interpret those key sequences.

> I know that other languages'
> REPLs have the same problem (like Racket), however there are some that
> support this feature (Python, Haskell). Do you think that could be
> doable for Kawa?

That's what the --enable-kawa-frontend configure option does.  It compiles
a C program as a front-end to Kawa.  This front-end program uses GNU readline.
There may be some portability issues with the frontend - I haven't made any
effort to port it, and it would certainly need major changes on Windows.

More portable is the JLine2 support I recently announced.  That is a 99%-pure-Java
re-implementation of GNU readline.  That gives you input editing, history,
and (now) tab-completion.

JLine2 may requires some native code on Windows; I haven't tried it under Windows yet.
It should work out-of-the-box on most Unix-like OSes, including GNU/Linux and MacOS.
(It should work on Windows too - I just don't have the instructions for doing that.)
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

  reply	other threads:[~2016-02-25 23:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25  2:13 Per Bothner
     [not found] ` <CAPFJfsva4VPt_RQ5NrNzY8n7oyZB0EGL7VuFAzsEcGS8ruDqbA@mail.gmail.com>
     [not found]   ` <CAPFJfsvV+Lnrko6Bj008DLA7007of_1a-XOM0oAYH5JTXrFRpA@mail.gmail.com>
2016-02-25 23:33     ` Andrea Bernardini
2016-02-25 23:51       ` Per Bothner [this message]
2016-02-26  0:48         ` Andrea Bernardini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56CF9386.6040001@bothner.com \
    --to=per@bothner.com \
    --cc=andrebask@gmail.com \
    --cc=kawa@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).