I want to implement auto-completion feature for my CLI application. The default behavior of getc() is returning only when the following list of characters are entered: NEW_LINE or EOF. I want to add TAB to this list so that I can trigger my auto-completion algorithm.
Is there a way to do it, for instance, using termios? The editline library (http://www.thrysoee.dk/editline/) can do it but I could not figure how it does?