kuzudb / kuzu

Embeddable property graph database management system built for query speed and scalability. Implements Cypher.
https://kuzudb.com/
MIT License
1.42k stars 99 forks source link

kuzu binary: readline functionality buggy #1391

Closed vbmithr closed 1 year ago

vbmithr commented 1 year ago

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

ray6080 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

@vbmithr thanks! We will take a look.

uwegeercken commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

semihsalihoglu-uw commented 1 year ago

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

acquamarin commented 1 year ago

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 commented 1 year ago

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

vbmithr commented 1 year ago

Ok, seems fixed indeed. Thanks @acquamarin!