This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: tab-completion implemented for Kawa
- From: Andrea Bernardini <andrebask at gmail dot com>
- To: Per Bothner <per at bothner dot com>
- Cc: kawa at sourceware dot org
- Date: Fri, 26 Feb 2016 00:48:47 +0000
- Subject: Re: tab-completion implemented for Kawa
- Authentication-results: sourceware.org; auth=none
- References: <56CE6324 dot 80502 at bothner dot com> <CAPFJfsva4VPt_RQ5NrNzY8n7oyZB0EGL7VuFAzsEcGS8ruDqbA at mail dot gmail dot com> <CAPFJfsvV+Lnrko6Bj008DLA7007of_1a-XOM0oAYH5JTXrFRpA at mail dot gmail dot com> <CAPFJfsuKUjZSkKCZLTFUMybXpp6N4SMXqGerduNEsrhfnJ=J2g at mail dot gmail dot com> <56CF9386 dot 6040001 at bothner dot com>
On Thu, 25 Feb 2016 15:51:34 -0800
Per Bothner <per@bothner.com> wrote:
> 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.
Interesting. I just tried on Debian, it works, thanks
> 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.
This works too, and with the tab completion indeed, great!