1 /* **************************************************************** */
5 /* **************************************************************** */
8 * Remove the next line if you're compiling this against an installed
11 #define READLINE_LIBRARY
13 #if defined (HAVE_CONFIG_H)
18 #include <sys/types.h>
22 extern HIST_ENTRY **history_list ();
30 prompt = "readline$ ";
35 temp = readline (prompt);
41 /* If there is anything on the line, print it and remember it. */
44 fprintf (stderr, "%s\r\n", temp);
48 /* Check for `command' that we handle. */
49 if (strcmp (temp, "quit") == 0)
52 if (strcmp (temp, "list") == 0)
57 list = history_list ();
60 for (i = 0; list[i]; i++)
61 fprintf (stderr, "%d: %s\r\n", i, list[i]->line);