zsh-autocomplete icon indicating copy to clipboard operation
zsh-autocomplete copied to clipboard

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

Open edte opened this issue 4 months ago • 12 comments

just disable this

edte avatar Feb 21 '24 03:02 edte

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.

unode avatar Feb 26 '24 15:02 unode

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

vedal avatar Feb 27 '24 19:02 vedal

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.

duxbuse avatar Feb 28 '24 03:02 duxbuse

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

ordy avatar Feb 28 '24 16:02 ordy

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

edte avatar Feb 29 '24 03:02 edte

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.

unode avatar Feb 29 '24 08:02 unode

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

abenz1267 avatar Mar 06 '24 15:03 abenz1267

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

MichaelFlucher avatar Apr 02 '24 11:04 MichaelFlucher