Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: minor annoyance when I use TAB completion



On Mon, 28 Oct 2019 at 14:22, Fourhundred Thecat <400thecat@xxxxxx> wrote:
>
> Hello,
>
> I have minor annoyance when I use TAB completion in zsh:
>
> When I type "lso" and hit TAB to complete:
>
>   lso<TAB>
>
> the completion successfully completes to "lsof" and my commandline looks
> like this:
>
>   lsof <cursor>
>
> notice the one space between lsof and the cursor. But when I start
> typing, the space disappears (cursor jumps back), and whatever I typed
> is glued to lsof, ie
>
>   lsof| grep
>
> instead of
>
>   lsof | grep
>
> could anybody please advise how to fix this, before it drives me crazy ?
> The problem is when I use ctrl+w to delete word backwards, I want to
> delete "|" as one word and not "lsof|"
>
> thanks,

I have somewhat a reversed issue. I use:

zstyle ':completion:*:*:*:default' menu yes select search

so I can search through the completions. When I accept an entry,
either with a double-enter or a space:

bindkey -M menuselect ' ' .accept-line

I then have a space added after the accepted entry. And it doesn't get
removed when I continue typing, like in the author's post. I would
like to have it removed. Note, that it's not possible to bind custom
widgets to the menuselect key map.

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org



Messages sorted by: Reverse Date, Date, Thread, Author