历史+的ReadLine + ncurses的 [英] history+readline+ncurses

查看:78
本文介绍了历史+的ReadLine + ncurses的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在写一个shell(项目)。我想使用readline,ncurses

和/或历史来搜索历史记录。我想写一个函数,

会识别KEY_UP和KEY_DOWN,并搜索历史记录。我希望

上下键与unix终端中的行为相同。如果

有人可以帮助我,我会非常感激。


提前谢谢你,

Natalie

解决方案

文章< 11 ********************* @ j27g2000cwj。 Google网上论坛。 com>,

lnatz< nm ********** @ gmail.comwrote:


>我是写一个shell(项目)。我想使用readline,ncurses
和/或历史记录来搜索历史记录。



答案与你昨天提出的问题相同:你不能在标准C中做
。你需要系统 - 这样做的具体扩展,

我们不支持comp.lang.c中特定于系统的扩展。

您需要咨询处理的新闻组无论你使用什么

操作系统。

-

原型是他们克隆的超类型。 - maplesoft


lnatz写道:




我写的一个shell(项目)。我想使用readline,ncurses

和/或历史来搜索历史记录。我想写一个函数,

会识别KEY_UP和KEY_DOWN,并搜索历史记录。我希望

上下键与unix终端中的行为相同。如果

任何人都可以帮助我,我会非常感激。



请不要多发同一个问题一组。它会浪费每个人的时间,包括你的。


-

Ian Collins。


Walter Roberson< ro ****** @ ibd.nrc-cnrc.gc.cawrote:


in article< 11 ********************* @ j27g2000cwj.googlegroups。 com>,

lnatz< nm ********** @ gmail.comwrote:


>>我正在写一个shell(项目)。我想使用readline,ncurses
和/或历史记录来搜索历史记录。


答案与你昨天问的时候一样:你不能这样做
那个标准C.您需要特定于系统的扩展来执行此操作,

并且我们不支持comp.lang.c中特定于系统的扩展。



comp.unix.programmer处理POSIX,例如。


问题中没有任何内容需要关于

系统特定扩展的评论,因为有一个众所周知的跨平台

接口,即使它可能不适用于_your_特殊系统。


忽略comp.programmer和comp.shell,因为它们通常无关紧要。


-

Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net


Hi,
I am writing a shell(project). I would like to use readline, ncurses
and/or history to search history. I want to write a function that
would recognize the KEY_UP and KEY_DOWN,and search the history. I want
the upand down key to act the same as it would in a unix terminal. If
anyone could help me, I would greatly appreciate it.

Thank you in advance,
Natalie

解决方案

In article <11*********************@j27g2000cwj.googlegroups. com>,
lnatz <nm**********@gmail.comwrote:

>I am writing a shell(project). I would like to use readline, ncurses
and/or history to search history.


The answer is the same as when you asked yesterday: you can''t do
that in standard C. You need system-specific extensions to do that,
and we don''t support system-specific extensions in comp.lang.c .
You need to consult with a newsgroup that deals with whatever
operating system you are using.
--
Prototypes are supertypes of their clones. -- maplesoft


lnatz wrote:

Hi,
I am writing a shell(project). I would like to use readline, ncurses
and/or history to search history. I want to write a function that
would recognize the KEY_UP and KEY_DOWN,and search the history. I want
the upand down key to act the same as it would in a unix terminal. If
anyone could help me, I would greatly appreciate it.

Please don''t multi-post the same question to more than one group. It
wastes everybody''s time, including yours.

--
Ian Collins.


Walter Roberson <ro******@ibd.nrc-cnrc.gc.cawrote:

In article <11*********************@j27g2000cwj.googlegroups. com>,
lnatz <nm**********@gmail.comwrote:

>>I am writing a shell(project). I would like to use readline, ncurses
and/or history to search history.

The answer is the same as when you asked yesterday: you can''t do
that in standard C. You need system-specific extensions to do that,
and we don''t support system-specific extensions in comp.lang.c .

comp.unix.programmer deals with POSIX, for instance.

There''s nothing in the question that requires the comment regarding
"system-specific extensions", since there''s a well-known cross-platform
interface, even if it may not happen to apply to _your_ particular system.

ignore comp.programmer and comp.shell, since they''re usually irrelevant.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net


这篇关于历史+的ReadLine + ncurses的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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