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

Re: Use external tool if there are a large number of completions



gi1242+zsh@xxxxxxxxx wrote on Sun, 13 Sep 2020 18:21 -0400:
> I was wondering if it's possible to use an external tool if there are
> more than a certain number of completions. Sometimes there are thousands
> of completions (eg apt install), and the keyboard interface isn't too
> efficient. However, things like "rofi" handle this very nicely. So is it
> possible to invoke a custom command (e.g. rofi -dmenu) if there is more
> than (say) half a screenful of completions?

[ For context, rofi(1) is a GUI tool for selecting one text line out of a list. ]

You might be able to engineer something using «compadd -O».

There's also <https://github.com/Valodim/zsh-capture-completion>,
though I haven't used it myself.




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