malxau / yori

Yori is a CMD replacement shell that supports backquotes, job control, and improves tab completion, file matching, aliases, command history, and more.
http://www.malsmith.net/yori/
MIT License
1.24k stars 31 forks source link

Support clink-like lua completion scripts #47

Open remkop opened 4 years ago

remkop commented 4 years ago

Clink offers the ability to customize its shell completion with lua scripts. Some of clink's own functionality, like built-in completions, are also implemented in lua. This integration is very powerful; it makes it possible to customize the built-in completion as well as add custom completion logic.

In addition to the abilities of the lua programming language, Clink offers a parsing API that greatly simplifies the development of custom completion scripts.

This is related to our discussion in #41: supporting lua and Clink's argument parser API is one way to address the concern about the complexity of completion scripts for non-trivial commands like git.

Another benefit I can see is that by supporting this API, existing lua completion scripts can be used as is in yori, which may make the idea of migrating to yori much more attractive for clink users. Published collections of clink completion scripts like https://github.com/vladimir-kotikov/clink-completions would instantly add to yori's power and hopefully foster community enthusiasm and engagement, since the clink project itself appears to be abandoned.

TBD: