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

Questions regarding _hosts completion extension



Hello dear workers,
I have some questions regarding a stock _hosts completion function.

The original function, IMHO, has a few flaws that kind of difficult to address without a heavy development, in particular:
I've spent some time developing a solution addressing all mentioned points. It's the third implementation. The first one was done as an internal product, and the two last are in my repository https://github.com/Felixoid/zsh-hoco/blob/master/hoco.zsh. Features it has:
  • Users can set HOCO_FUNCTIONS array. Then its output will be split by spaces, tabs, and new lines, and used as the hosts' completion.
  • Uses the cache functions _store_cache, _retrieve_cache, and _cache_invalid. The cache content is shared between instances when `:completion:* use-cache` is set.
  • Functions or binaries are executed in the background and don't block the terminal.

I'd like to ask about your opinion if it makes sense to bring it to the upstream. I am sure it still doesn't comply with the requirements for 100% and can be improved. On the other hand, it brings many advantages. I'd like to hear your opinion before trying to prepare a patch if it completely breaks some rules though. For example, if async shouldn't be used in completion.

What do you think?

Best regards,
Mikhail f. Shiryaev


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