olets / zsh-abbr

The zsh manager for auto-expanding abbreviations, inspired by fish. ~18,000 clones by ~12,000 unique cloners as of Sept '24, and averaging ~60 Homebrew installs monthly since June 2023
https://zsh-abbr.olets.dev
Other
555 stars 19 forks source link

zsh-autosuggestions' suggestions don't clear after the line is accepted #67

Closed Icy-Thought closed 1 year ago

Icy-Thought commented 1 year ago

I do apologize if zsh-abbr is not at fault here, I am still a ZSH newbie who recently migrated from Fish..

What I am here to report today is that whenbindkey -M main "^M" abbr-expand-and-accept is used, the suggestions provided by zsh-autosuggestions would still be printed after the entered command even though it was never accepted.

image

And after some experimentation + searching I stumbled upon bindkey -M main "^M" accept-line which happens to solve the issue but at the cost of having no abbr on Enter.

Before Enter: image

After Enter: image

I obviously do not know what the appropriate solution to this issue is and therefore I am here to request help from someone who is more knowledgeable than myself!

olets commented 1 year ago

Thanks for the report!

I was able to replicate this.

Possible it's a zsh-autosuggestions bug, possible I'm misunderstanding how to use the tools zsh-autosuggestions provides for clearing suggestions. I've opened a zsh-autosuggestions issue. Labelling this issue "needs more info" not because I need info from you but because I need info from zsh-autosuggestions.

Icy-Thought commented 1 year ago

Good to know! Also, thank you for putting in the time and effort to solve this issue!

olets commented 1 year ago

Figured it out. Should be fixed in https://github.com/olets/zsh-abbr/releases/tag/v4.8.3 and https://github.com/olets/zsh-abbr/releases/tag/v5.0.0.beta-3. Let me know if it continues to give you trouble!

Icy-Thought commented 1 year ago

Will do! And thanks again for fixing it! :)

Icy-Thought commented 1 year ago

Just installed + tested the latest release and I can confirm that this issue has indeed been resolved! :tada:

Closing this issue since no further investigation/fixes are required.

olets commented 4 months ago

Belatedly acknowledging more contributors in https://github.com/olets/zsh-abbr#community and https://zsh-abbr.olets.dev/community/

Would you like to be added @Icy-Thought? If so, I'll have the all-contributors bot open a pull request. Then I'll tag you in it to review for correct info

Icy-Thought commented 4 months ago

I guess I could be added to the site with the packaging tag? :shrug:

Was planning on migrating zsh-abbr to Guix after migrating anyways since I noticed it was missing from the packages list.

olets commented 4 months ago

Ok how about this: if that happens we revisit. Thanks!

Icy-Thought commented 4 months ago

Sure thing! I already maintain the nixpkg btw! 😉

olets commented 4 months ago

Oh nice! I've added that to the docs https://zsh-abbr.olets.dev/installation.html#linux-package-repositories

Want to be acknowledged in the Community list for that?

Icy-Thought commented 4 months ago

Hehe. I should've mentioned it earlier! xD If you feel I should be there, add me. :blush:

olets commented 4 months ago

@all-contributors please add @Icy-Thought for platform.

@Icy-Thought review the PR the bot posts below 👇 to see if the info it pulls is right

allcontributors[bot] commented 4 months ago

@olets

I've put up a pull request to add @Icy-Thought! :tada: