又快又好用的命令行交互工具,支持上内容输出,下命令交互形式.
下载
git clone https://github.com/planetPocket/TerminalCommandPrintf终端页面组成
/* * output example * output panel layout * ----------------------- * title * ----------------------- * Content Area * ----------------------- * Function List * ----------------------- * <0 1 2...N> * prev (h) next(l)*/#include"command_printf.h"voidDemoCallback(int funcNo){
printf("funcNo:%d called\n");
}
intmain()
{
CommandPrintf cp;
cp.addCommand(1,"Hello World");
cp.addCommand(2,"keep World");
cp.setFunctionCallback([&](int funcNo){
DemoCallback(funcNo);
cp.pushContentArea("echo: funcNo:%d\n");
});
cp.execAsync();
return0;
}
- 命令行功能解析
- 支持写文件
- 性能优化
- 命令解析支持
- 终端涂色
- Content Area 支持回滚显示
