Hmm well the meat of it is to compare what was typed so far with the command.
text = left(command, len(left))
If that's true that could be shown as a guess.
I don't want to deal with form objects or js so here's a way to do it with the keyboard and text object.
dropbox.com/scl/fi/13ai14e9r80zmv1qdm2j2/rough_autocomplete.capx
Probably can do it with a textbox too. Just replace the text objects with textboxes. Then do some CSS to make the main editbox have a transparent background so you can see the guess underneath.
Probably could do better with parsing the commands for syntax errors and giving more advanced autocomplete per token.