Replies: 6 comments
|
Hi, do you mean for the Rye console (REPL)? First it was based on peterh/liner, which is sort of readline, if I understand the point in Go, but when I was customizing the experience and because I wanted Console to work in terminal AND in javascript based xterm.js for example I started rewriting it from scratch (microliner.go file in the repo). I probably don't understand what you mean by readline interface ... do you mean REPL mode that has more standard readline / liner behaviour, or more feature complete console UX, or something that can interact with other things (like rlwrap)?. I know there is rlwrap and how to user it and that rlwrap is basically readline-wrap, but I never delved deeper what exactly that means and how that is achieved, sorry. So any more info is welcome. Janko |
|
On 05/12 06:20, Refaktor wrote:
Hi,
do you mean for the Rye console (REPL)? First it was based on
peterh/liner, which is sort of readline, if I understand the point in
Go, but when I was customizing the experience and because I wanted
Console to work in terminal AND in javascript based xterm.js for
example I started rewriting it from scratch (microliner.go file in the
repo).
I probably don't understand what you mean by readline interface ... do
you mean REPL mode that has more standard readline / liner behaviour,
or more feature complete console UX, or something that can interact
with other things (like rlwrap)?. I know there is rlwrap and how to
user it and that rlwrap is basically readline-wrap, but I never delved
deeper what exactly that means and how that is achieved, sorry. So any
more info is welcome.
Janko
-- Reply to this email directly or view it on GitHub:
#908 (comment)
You are receiving this because you authored the thread.
Message ID:
***@***.***>
Hi Janko,
first of all: I like Rye A LOT !!! :) Thank you very much for all your
effort to bring it to life!
What I meant is:
The gnu readline interface (the behaviour of of the commandline as
experienced by the user) is very common. And especially for new users
of Rye and its REPL the "repeat and correct" cycle and the possibility to recall
commands already used independant from the language itsself would be
very helpful.
(As far as I know) the gnu readline library already has all the features
like remembering the commandlines between calls of Rye via a history
file, searching and recalling given commands and so on (like in zsh/bash
and many other tools), so it do not need to be reimplemented again.
rlwrap is a wrapper for tools not haveing a REPL with readline. But often
times rlwrap interfere with actual REPL/commandline interface, since
both are unaware of each other.
If you already reimplemented it, it would be helpful especially for
newcomers to Rye, when keybinding etc. would be the same as with the
original gnu readline.
Think of an otherwise UNIX-experienced person, wanting to learn a new
language - Rye in this case - but her or his boss insists of using a
an editor with its keystroke shortcuts has been all assigned to new,
completly non standard key combos...
I would imagine, that the new shortcuts would imply more effort to learn,
than the new language.... ;)
Cheers!
Meino
|
|
Ok, thank you for clarification. Yes, this part is reimplemented in the microliner file, so it means it's more of a poor or uncomplete implementation that something wrong completely. Which keybindings are you concretely missing or behave differently so I start trying to implement those? What I think works as expected: Ctrl+a, e , f , b , k ; alt-backspace, up-down arrows What I know doesn't work: Ctrl+r (history search), y (yank), What I see works different:
|
|
On 05/13 11:48, Refaktor wrote:
Ok, thank you for clarification.
Yes, this part is reimplemented in the microliner file, so it means it's more of a poor or uncomplete implementation that something wrong completely.
Which keybindings are you concretely missing or behave differently so I start trying to implement those?
I use emacs (nox) as my main editor so I considered I am used to most of them but maybe not so.
What I think works as expected: Ctrl+a, e , f , b , k ; alt-backspace, up-down arrows
What I know doesn't work: Ctrl+r (history search), y (yank),
What I see works different:
* ctrl+backspace deletes whole word (like alt+backspace) - behaves like just like backspace in terminal
* ctrl+d : exits REPL - deletes one letter
--
Reply to this email directly or view it on GitHub:
#908 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
I would prefer to not to implement the keybindings of a certain editor -
because...hrmmm....editor wars... :)
More seriously: I am one of zillions (n)vi(m) users (as zillionish as
there are emacs users of course!) ... and we all will get a hard time to
learn emacs keybinds for a REPL which is not emacs related in any way.
The REPL is the command line of Rye and therefore I think the REPL should
behave like a command line.
You will find the keybindings of the gnu readline here:
https://gist.github.com/jottr/a2351377b7584abf100b
Cheers!
Meino
|
|
It seems I'm using mostly intersection of emacs and terminal because I use the same keybindings at both. Thanks for the full list. I opened an issue #911 |
|
Thank you! :)
…On 05/14 02:54, Refaktor wrote:
I opened an issue #911
--
Reply to this email directly or view it on GitHub:
#908 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
Uh oh!
There was an error while loading. Please reload this page.
Hi,
can we have a readline interface for the REPL of Rye. It should be available as a library.
Cheers!
Tuxic
All reactions