marlonrichert / zsh-autocomplete

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

accidental raw key insertion when navigating command parameters #251

Closed Aetherall closed 3 years ago

Aetherall commented 3 years ago
git -C ~zsh-autocomplete switch main  # Make sure you test with the `main` branch.
git -C ~zsh-autocomplete pull         # Update to the latest commit.
cd $(mktemp -d)                       # Create a temp dir and enter it.
unset _comp_dumpfile ZDOTDIR XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME
HOME=$PWD exec zsh -f       # Restart Zsh without config files in this dir.
source /path/to/zsh-autocomplete/zsh-autocomplete.plugin.zsh

From there you can see two strange behaviours For them to show up, type this command manually ls -H -H The unwanted behaviour is the not-found prompt, which make navigating difficult ( curl command edition etc)

Aetherall commented 3 years ago

Bisection revealed the faulty commit: [2a838cb6ef05c9912569cf9f899087f02ecf0c87] Reintroduce fully fuzzy matching as a fallback

Aetherall commented 3 years ago

Tried a naive fix but did not succeed ( just switched from fish, zsh is new for me )

I'm switching back to the parent of the faulty commit c7426be9e859e049747114818fa9107ecebe11b9

I will keep posting symptoms to help diagnose if i stubble upon another one :)

marlonrichert commented 3 years ago

Sorry, but I'm not at all sure what you're trying to report here. What should I do to see the bug and what exactly am I supposed to see?

Aetherall commented 3 years ago

Sorry I've not been really precise

I noticed a strange behavior when moving my cursor backward when correcting a curl command.

The behavior was the insertion of ^D characters when navigating across a header argument (-H)

I was able to reproduce it when typing ls - H - H in my terminal, and I noticed that when typing the second -H, zsh tried to look for possible matches within $PATH, and a key press on the arrow key inserted the key char into the prompt input

I tried on a clean Ubuntu docker image, with only zsh, git, and zsh-autocomplete, no zsh config

I will post a gif this weekend demonstrating the issue

marlonrichert commented 3 years ago

Closing this. If you can give me a working test case, I will reopen it.