Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kuzu binary: readline functionality buggy #1391

Closed
vbmithr opened this issue Mar 20, 2023 · 10 comments
Closed

kuzu binary: readline functionality buggy #1391

vbmithr opened this issue Mar 20, 2023 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@vbmithr
Copy link

vbmithr commented Mar 20, 2023

I frequently end up in a state where readline functionality (emacs-like key bindings) in the shell are not working anymore.

@ray6080
Copy link
Contributor

ray6080 commented Mar 20, 2023

Hi @vbmithr , can you provide a bit more details, such as the OS version, are you compiling from the latest master or using the released binary, and is there a specific operation in the shell that triggers the bug? so we can reproduce it more quickly. Thanks!

@vbmithr
Copy link
Author

vbmithr commented Mar 21, 2023

OS: Archlinux
Release: git
To reproduce on example of bugs:

  1. Type a command
  2. Do Ctrl+p to get it back from history
  3. Ctrl+a to go to beginning of the line
  4. Ctrl+d to delete thef first character.

Step 4 doesn't work. If typing characters at this point, something weird happens.

@ray6080
Copy link
Contributor

ray6080 commented Mar 21, 2023

@vbmithr thanks! We will take a look.

@ray6080 ray6080 added the bug Something isn't working label Mar 21, 2023
@acquamarin acquamarin mentioned this issue Mar 22, 2023
@uwegeercken
Copy link

on Linux I have similar issues. I do a Ctrl-a to go to the beginning and then the cursor will not move anymore. Sometimes when I move backwards in a line and then start typing, the text appears appended at the end of the line. At other times, pressing the right arrow once moves the cursor about 10 chars right and then the left arrow moves it to the starting position and the last character of the line gets removed. Very weird and seems to be different all the times.

@uwegeercken
Copy link

This is my line for testing:

hello this is a test line for checking the keyboard functionality
  1. I am at the end of the line
  2. I press Ctrl-a - the cursor jumps to the first position

Result: right arrow or Ctrl-e does not work. If I start typing multiple "a" (cursor is in the first position), this is the result:

hello this is a test line for checking the keyboard functionalityaaaaaaaaaa

If I press the backspace key, the cursor moves left and for each backspace an "a" at the end is removed

@vbmithr
Copy link
Author

vbmithr commented Mar 22, 2023

duckdb made it right, it's also a C++ project, maybe you could just port their solution :D

@semihsalihoglu-uw
Copy link
Contributor

:) Nice! I am sure if we can write a DBMS, we can get this right too :)

@acquamarin
Copy link
Collaborator

Hello,

We have fixed the CLI-issues in PR #1402.

Similar to duckdb, we use the third-party library linenoise as our shell solution. However, the logic to handle utf-8 characters is implemented by us.

Thanks for your feedback, we will continuously work on improving our shell.

@uwegeercken
Copy link

it is sooo much better now. It's sometimes the little things that make the developer happy :-)

@vbmithr
Copy link
Author

vbmithr commented Mar 26, 2023

Ok, seems fixed indeed. Thanks @acquamarin!

@vbmithr vbmithr closed this as completed Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants