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

Re: How to add a 'non-escaped' tilde to the completion list



Thank you Oliver, you are right. It was related to the 'zle ...'
command. The binding however was not the problem, but the type of
completion.

Now I fixed it. You can now hit CTRL+v to get the list of folders and
afterwards hit Tab to cycle through the list:

  function _term_list(){
    local -a w

    for SESSION in $(pidof  zsh); do
      w+=${(D)$(readlink -n /proc/${SESSION}/cwd)}
    done

    compadd -aQ w
  }

  zle -C term_list menu-complete _generic
  bindkey "^v" term_list
  zstyle ':completion:term_list:*' completer _term_list

Btw, I'm not sure if "advertisement" is allowed here. I have submitted
the plugin to the oh-my-zsh project. But without any testers, they don't
want to merge it in to the mainline project. So if anybody is interested
you can test it... =)

Cheers,
Jester


On Mon, 2014-11-10 at 14:57 +0100, Oliver Kiddle wrote:
> Death Jester wrote:
> >   zle -C term_list complete-word _generic
> 
> _generic, or more specifically _main_complete, is the source of some of
> the problems with this. Try using _term_list directly.
> 
> Very nice idea by the way. If you get it working fully, please post it
> so I can steal it for my setup.
> 
> Oliver




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