[英]Is ncurses a good choice to implement a command history in a C program in linux
I am a student and I'm taking a course where my project is to write a server using unix sockets, threads or epoll, and so forth. 我是一名学生,我正在学习一门课程,我的项目是使用unix套接字,线程或epoll编写服务器,等等。
However, as the client takes his input from the user, I wanted to go an extra mile and give it some sort of memory for the commands he has given in the past; 然而,当客户从用户那里获取他的意见时,我想加倍努力,为他过去给出的命令提供一些记忆; like the shell or gdb has.
像shell或gdb一样。
I have no idea how to do this, can you guys help me? 我不知道该怎么做,你们能帮助我吗? I put ncurses in the title because I suspect I'm supposed to use it, but I don't know how, I never used ncurses before.
我把ncurses放在标题中,因为我怀疑我应该使用它,但我不知道怎么做,我之前从未使用过ncurses。
GNU readline库提供此功能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.