I decided to give zsh a try. First i'll describe how things work right now and then i'll describe how I would like them to work.
Lets say I have 2 subfolders in current folder, 1st one "Documents", 2nd one "Downloads".
If I type "cd D" and press TAB, it will auto complete with "Do".
Press TAB again, it will auto complete with "Documents".
Press TAB again, it will auto complete with "Downloads".
Press TAB again, it will auto complete with "Documents" (I appreciate that here it dosen't go back to "Do" like Bash does).
At this point I have to pres Enter twice to change the directory. (first Enter to select "Documents" and second one to execute the comand).
How I would like zsh to behave:
How can I do this? :-)
Wow, one year and no replies. I hope you found out how, but for others who might come across this via a search...
First make sure you have the completion module loaded with this line
zmodload zsh/complist
Then you can bind Enter, aka ^M
, during menuselect
to the function accept-line
- which is normal behaviour - but by prefixing it with a dot, if forces it to leave menuselect
mode before the function executes
bindkey -M menuselect '^M' .accept-line
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With