I managed to extract the list of accessible symbols from the chaiscript state, and I’m starting to get a pretty “good feeling” interactive terminal in that game engine thingy I’m messing with.
For now when TAB is pressed I’m just getting the last word/symbol currently being typed in the input string, and look for things that start with that sub-string, if there’s only one I autocomplete, if not, I just print the list of possibilities to the console.
I spent a little bit too much time just playing with it, it makes for a cool little interactive quake-style drop down terminal:
So yeah, to answer @prospero, it’s more than a viable idea, and you can have auto-completion, you just have to write the logic yourself for that, and a naive aproach like the one described above seems to be a good starting point. It’s not as awesome as like, Zsh, but it’s not bad at all!