aclib - CLI auto-completion library
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
LICENSE
Makefile
README
auto_complete.c
auto_complete.h
example.c
special_keys.c
special_keys.h
vt100codes.h
vt100term.c
vt100term.h

README

Copyright (c) 2015, Maciej Kaminski. 
WWW: maciejkaminski.pl
email: maciej.a.kaminski@gmail.com

Published under 2-clause BSD-style license
1. Redistributions of source code must retain the above copyright notice
2. Redistributions in binary form must reproduce the above copyright notice

Version number is 1.1

library exports just 7 functions in one header
 - init_completion - add phrase to completion table
 - init_completions - sort completions table
 - getline_complete - get line; returns 0 if just eolf 
 - completion_exists - check if completion is defined
 - print_history - print command history to stdout
 - hide_acline - when multithreaded application wants to print something without interrupting
     input of command, you can temporarily hide
 - restore_acline - and restore it immediately
please refer to comments in auto_complete.h for whole API description

please refer to example.c to see how to use this shit

Version 1.1
  introduced hide_acline and restore_acline, basic support for C++ and thread safety