Shell implementation in rust , in the tab completion builtin

] $ ls -1 nonexistent >> /tmp/rat/ant.mdj
[tester::#UN3] ^ Line does not match expected value.
[tester::#UN3] Expected: “$ ls -1 nonexistent >> /tmp/rat/ant.md”
[tester::#UN3] Received: “$ ls -1 nonexistent >> /tmp/rat/ant.mdj”
[tester::#UN3] Assertion failed.
[tester::#UN3] Test failed

this is the error i got , everything is fine , after a lot of debuggig i am unable to spot the exact bug

Hey @harshitneversettle, could you take a look at your key parsing logic around the ENTER key?

In some languages, ENTER is treated as Alt+J Ctrl+J instead of \n, which can lead to a stray j showing up in the input.

Thanks for addressing my question andy1li

this is my Enter logic

according to me , the bug is is due to the raw mode enabled , but somehow i am unable to find that :slight_smile:

1 Like

@harshitneversettle Thanks for sharing the screenshot! Could you try handling Ctrl+J the same way as Enter?


In crossterm, newline (0xA) is mapped to Ctrl+J in raw mode:

cool , i will definitely go through it ,
is there any way i can connect with you , for me , it is my x : https://x.com/Harshit_yad4v
would love to connect

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.