zsh-autocomplete
zsh-autocomplete copied to clipboard
Bug? `sudo` completes from history on up arrow, `ls` goes to last history item?
What do you want?
How can I search history with text already entered at the prompt in zsh?
I don't understand how this works currently.
- When I press down, executables are shown, good.
- When I type
sudo
and press up, the history items beginning withsudo
are shown. - When I type
ls
and press up, the last-added entry of history is shown. ???
Why does occurrence 3 not use history?
Why do you want this?
I used to have a ZSH configuration (that I cannot seem to find on any drive) that would show history lines whose beginnings matched the string that I had currently typed. It was as if history filtered itself as I typed. I wish to have this feature again.
It works for me. Can you put together a minimal, reproducible test case using the setup below?
cd $(mktemp -d)
git clone --depth 1 -- https://github.com/marlonrichert/zsh-autocomplete.git
> .zshrc <<EOF
PS1='%# ' PS2= RPS2='%^'; setopt transientrprompt interactivecomments
source ~/zsh-autocomplete/zsh-autocomplete.plugin.zsh
EOF
env -i HOME=$PWD PATH=$PATH TERM=$TERM ${TERMINFO:+TERMINFO=$TERMINFO} zsh -d
I think that this issue was either a history misconfiguration, or a conflict of keybinds between zsh-edit and this. Both have been resolved.
Question: You make both plugins, why do the default keybinds overlap?
They don’t for this case at least. Zsh Edit does not touch the Up key.
On which keybindings do they overlap?