Don't write your own command line interface; use GNU Readline!
http://tiswww.case.edu/php/chet/readline/readline.html#SEC23
This is exactly what you're looking for for better command line interface, including completion, line editing, interactive history manipulation and more ...!
And for using these libraries, you need to install it in your linux environment. Try install libreadline-dev 5 and 6!
No comments:
Post a Comment