daniele77 / cli

A library for interactive command line interfaces in modern C++
Boost Software License 1.0
1.24k stars 140 forks source link

Add basic support for emacs-like line editing. #201

Open s10e-g opened 1 year ago

s10e-g commented 1 year ago

Fix part of #152 by implementing some of the readline emacs mode line editing shortcuts on Linux local session and VT100 compatible terminal.

TODO:

s10e-g commented 1 year ago

Ultimately this function should be implemented using GNU readline or curses / unibilium. I fully understand that you want this library to remain independent of third-party libraries, but since C++ itself doesn't have any knowledge about the terminal, even a simple task like clear screen is not possible without reinventing ncurses.

Maybe it's ok to leave the user an option in the future?

daniele77 commented 1 year ago

Thank you for your contribution. I'm against making the cli library dependent on other libraries. The library started with a strong dependency on boost, and I had much pressure to remove that dependency, and it cost me hard work. Now, I definitely do not want to add another dependency.