Hi Bert, There's no magic function here - it is old-fashioned ANSI escapes. In essence:
- Output the text that's been typed - Output the escape code to make the text gray - Output the suggestion - Use cursor motion escapes to move the cursor back to the end of the text fish's implementation of this stuff is in reader.cpp Hope that helps, _fish On May 5, 2013, at 12:07 AM, Bert <bgmuthal...@gmail.com> wrote: > Hi, I apologize in advance because this question is off-topic, but how does > fish-shell do the immediate update of the terminal for per-character feedback > for the user? > > To be more specific, what C function or library might I use to implement a > predictive autocomplete for a user without requiring them to hit the TAB key? > > I am trying to figure out how to implement the same kind of > typeahead/autocomplete in another command-line application I am working on. > > Thanks so much in advance. > > Sincerely, > Bert ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may _______________________________________________ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users