magicant / yash

Yet another shell
http://magicant.github.io/yash/
GNU General Public License v2.0
330 stars 30 forks source link

filename completion with tab inserts additional backslash if started from one #47

Closed rofl0r closed 5 months ago

rofl0r commented 7 months ago

Describe the bug when pressing tab after a backslash in a filename, a second backslash is added, making the filename iunvalid

To Reproduce

touch "hello space world.txt"
ls hello<TAB>

filename gets expanded to hello\ space\ world.txt use backspace to delete everything after the last backslash, so you're left with: ls hello\ space\. hit tab again. the completed filename is now hello\ space\\ world.txt. this makes the escaped filename invalid.

Expected behavior if hitting tab after a backslash that's not in the original filename: either don't autocomplete at all, or remove the last backslash before completion.

Environment (please complete the following information):

rofl0r commented 6 months ago

should i open this on osdn to get any feedback ? ah... i see... you've fallen prey to the "muh security, rewrite it in rust" propaganda, and now depend on a corporate-controlled compiler without a spec that changes with every week that passes, so it's impossible to build it from source. that's very sad, R.I.P. yash.

magicant commented 6 months ago

If you want a bug to get fixed sooner than the maintainer can address it, you can contribute a patch.

rofl0r commented 6 months ago

tbf, i was concerned about your well-being, since you always responded to my bugreports on osdn within hours, so i came to check your profile and was relieved that you were active and well - until i saw the yash-rs repo. anyway glad you're ok. i just stared at your code for an hour but couldn't even figure out where the current line of user input is saved. your code is too abstract for me, it also took me hours to grok your code when i tried to make the history behave like bash, but at the end i gave up. i'd have to singlestep everything to grasp the complete picture.

magicant commented 6 months ago

Great thanks for caring about me. After finishing the first beta release of yash-rs which is expected in several weeks (or maybe months) I think I will be able to spend some more time for yash.

Sorry that you're having a hard time working on yash's codebase, and that's one of the reasons I started working on yash-rs. After years of development, yash has evolved too large and complex for non-maintainers like you to get involved and contribute. It's even difficult for me to add new non-trivial features.