有一个简单的替代READLINE? [英] Is there a simple alternative to Readline?

查看:928
本文介绍了有一个简单的替代READLINE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个项目,我的工作,我试图让它接受用户的命令,并提供历史的向上箭头。我的目标,以保持该项目免费依赖性,我不希望有需要的人也安装readline的开发文件只是编译我的项目。有谁知道一个简单的下拉更换为GNU的Readline只能提供简单的功能呢?

On a project I'm working on, I'm trying to make it accept user commands and provide history with the up arrow. I'm aiming to keep this project free of dependencies, and I don't want to have to require people to also install the readline development files just to compile my project. Does anyone know of a simple drop-in replacement for GNU Readline that provides only simple functionality?

推荐答案

大多数系统已经安装的ReadLine,所以我不认为这是是太大的问题的。

Most systems have readline installed, so I don't see that as being too much of an issue.

其次,我不认为有任何直接替换为GNU readline库。你将不得不坚持下去。 (

Secondly, I don't think there's any drop-in replacement for the GNU Readline library. You're going to have to stick with it. :(

编辑2016年5月11日:这个答案已经过时,任何编辑我会做会几乎完全从其他更正确答案中借用。摘要:见 linenoise 并的 editline 现代readline的替代品。

Edit 5/11/2016: This answer is outdated, and any edit I'd make would be borrowing almost completely from the other, more correct answers. Summary: see linenoise and editline for modern readline alternatives.

这篇关于有一个简单的替代READLINE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆