marlonrichert / zsh-autocomplete

🤖 Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.
MIT License
5.39k stars 149 forks source link

Is there a way to disable the up-arrow search history? #692

Open edte opened 9 months ago

edte commented 9 months ago

just disable this

unode commented 9 months ago

Commenting out https://github.com/marlonrichert/zsh-autocomplete/blob/c7b65508fd3a016dc9cdb410af9ee7806b3f9be1/Functions/Init/.autocomplete__key-bindings#L45 and https://github.com/marlonrichert/zsh-autocomplete/blob/c7b65508fd3a016dc9cdb410af9ee7806b3f9be1/Functions/Init/.autocomplete__key-bindings#L47 seems to do it for me.

That said, I would also see benefit in having a way to disable or customize this behavior as it seems inconsistent with the rest.

vedal commented 8 months ago

That said, I would also see benefit in having a way to disable or customize this behavior as it seems inconsistent with the rest. For me, thats particularly true when up-arrowing with an empty prompt (just re-run the last command), which I do alot. It would be cool if the search history only showed up after 2 (or N) up-arrows

duxbuse commented 8 months ago

Yeah I also wanted to disable it, cause it often locks up for me and I have to kill the terminal. Cant Ctrl+C out of the history menu and then its all buggered.

ordy commented 8 months ago

Yeah I also wanted to disable it, cause it often locks up for me and I have to kill the terminal. Cant Ctrl+C out of the history menu and then its all buggered.

It used to make my terminal freeze too, until I commented the lines mentioned in this comment https://github.com/marlonrichert/zsh-autocomplete/issues/645#issuecomment-1800522781

edte commented 8 months ago

This problem has been solved. The requirement is to disable the display of fzf's history when pressing up, but after pressing tab, the arrow keys also can be able to be used in completion. Now the requirements are basically met.

my modifications:

截屏2024-02-29 11 47 56

pr: https://github.com/marlonrichert/zsh-autocomplete/compare/main...edte:zsh-autocomplete:main

now:

https://github.com/marlonrichert/zsh-autocomplete/assets/50194671/6af412ac-d891-4e2e-8a03-9e302501ca94

unode commented 8 months ago

Could you please leave this open until an actual fix is implemented? Simply commenting out those lines isn't really a fix but more of a workaround.

abenz1267 commented 8 months ago

the readme states how to reset up/down arrow keys to zsh-default: https://github.com/marlonrichert/zsh-autocomplete?tab=readme-ov-file#reset-history-key-bindings-to-zsh-default

MichaelFlucher commented 7 months ago

I'm also trying to disable the history search. I just want normal scroll through the history like zsh native. I tested both solutions, commenting out those two key binding lines, and also adding the function in .zshrc before and after sourcing zsh-autocomplete.plugin.zsh. Any suggestions to fix this?

Update: https://github.com/marlonrichert/zsh-autocomplete/issues/698#issuecomment-1995142731 putting source oh-my-zsh.sh above source zsh-autocomplete.plugin.zsh fixed it

jul-sh commented 6 months ago

bumping this, I prefer to default behavior. it would be nice have actual config to support this.

zt64 commented 6 months ago

Same issue here, tried everything suggested before and none of that works

samscientist commented 6 months ago

Same issue here, tried everything suggested before and none of that works

I commented on the related issue for what worked for me. Give it a try :) https://github.com/marlonrichert/zsh-autocomplete/issues/645#issuecomment-2131297264

jul-sh commented 5 months ago

still unable to disable the arrow up search

Dinhero21 commented 3 months ago

the readme states how to reset up/down arrow keys to zsh-default: https://github.com/marlonrichert/zsh-autocomplete?tab=readme-ov-file#reset-history-key-bindings-to-zsh-default

It has since been deleted, "Restore Zsh-default functionality" looks really out of place without it

Edit: found the commit