<@U4BC85U0K> I started exploring supporting extern...
# kash_shell
c
@linux_china I started exploring supporting external tab completers, and it turns out to be pretty easy. Here is a quick one I just wrote which works just fine with that new implementation:
Copy code
fun gitComplete(line: String, cursorIndex: Int): List<String> {
    val words = line.split(" ")
    if (words[0] == "git") return listOf("commit", "status")
            else return emptyList()
}

if (args.size == 2) gitComplete(args[0], args[1].toInt())
else null
🎉 2
y
This is awesome! This is all stuff I built myself and excited if I can delete that. BTW I’ve found picocli generating the bash/zsh side of completion scripts is pretty nice. So this is a good direction to see. Plus with graal the startup times can be fast enough to be interactive for complex completions.