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

Re: Completion introspection



On Mon, Jun 1, 2020 at 10:07 AM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>
> What problem are you trying to solve?

In addition to regular tab completion (expand-or-complete) I have
another key binding for file completion with fzf. If I complete `vi
./` with tab, it'll ask me to choose the first path segment. If I
complete it with alt-i (my fzf file completion binding), I'll be
presented with fuzzy search UI over all files in the current directory
(recursively).

Unfortunately, alt-i binding doesn't work very well. It tries to guess
which word is being completed and which command but it does it without
involving the standard zsh completion system, so it fails often. I'm
trying to improve it.

Maybe there is another way? Perhaps it's possible to configure zsh
completion system so that all file completions are recursive? My tab
binding is actually also using fzf if there are multiple possible
completions, so if file completions were recursive, that would work.

> Why must the widget not be a completion widget?

I'm not sure if it must be. The current widget isn't a completion
widget and I know how to fix it if only I knew how to get the bits of
information I asked about (the word that would be completed if I
pressed tab, etc.).

Roman.



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