Re: ncurses + history + readline



On 2007-02-10, Thomas Dickey wrote:
Chris F.A. Johnson <cfajohnson@xxxxxxxxx> wrote:
On 2007-02-09, Thomas Dickey wrote:
Chris F.A. Johnson <cfajohnson@xxxxxxxxx> wrote:

The readline library has everything you need and is very easy to
use (man readline).

It depends. I don't find anything in it that I need, or would choose to use.

It has everything the OP asked for.

that hasn't been proven.

Given what the OP asked for (quoted below), what does it not
provide?

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.

(but given your preference for hardcoded approaches to coding

If you looked at my code, you would know that is not true.

I assume that you are referring to my use of "ANSI" screen codes in
shell scripts. If so, can you suggest a more portable way, in shell
scripts, than to use the closest thing there is to a standard for
terminals?

it's unlikely that you'll provide any contrary details ;-)

Non-sequitur alert.

--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
.



Relevant Pages

  • Re: ncurses + history + readline
    ... I would like to use readline, ncurses ... and/or history to search history. ... The readline library has everything you need and is very easy to ...
    (comp.unix.programmer)
  • Re: history+readline+ncurses
    ... I would like to use readline, ncurses ... and/or history to search history. ... The readline library has everything you need and is very easy to ...
    (comp.unix.shell)
  • Re: history+readline+ncurses
    ... I would like to use readline, ncurses ... and/or history to search history. ...
    (comp.lang.c)
  • ncurses + history + readline
    ... I would like to use readline, ncurses ... and/or history to search history. ...
    (comp.unix.programmer)
  • history+readline+ncurses
    ... I would like to use readline, ncurses ... and/or history to search history. ...
    (comp.unix.shell)