[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Readline (was ... replay history)
From: |
John W. Eaton |
Subject: |
Readline (was ... replay history) |
Date: |
Mon, 23 Nov 1998 10:04:48 -0600 (CST) |
On 23-Nov-1998, Dirk Laurie <address@hidden> wrote:
| John W. Eaton wrote:
| >
| > For now though, do the history and run_history commands, or the
| > reverse searching feature in readline (C-r) help?
| >
| C-r is useful: I hadn't thought of it. Thanks.
|
| While we are on the topic of readline: those of us who come to
| Linux via MSDOS rather than Sun or DEC Unix'es set up our xterm's
| so Delete erases the character under the cursor instead of the one
| to the left of it, which Backspace also deletes.
|
| The way I do it is by putting an entry
| DEL: delete-char
| in my ~/.inputrc file in the part dealing with an xterm.
| According to the readline manpage, readline is initialized
| from that file.
|
| Unfortunately Octave seems to override the xterm settings.
| Is there any way to get Octave to make the Delete key do
| delete-char in Octave?
Does
DEL: delete-char
actually work for xterms running bash? I couldn't make that work, but
"\C-?": delete-char
did seem to work correctly for me.
Octave does read the ~/.inputrc file, but it doesn't pay attention to
anything inside term= or program name conditionals because of a small
programming error that the following patch should fix.
Thanks,
jwe
Mon Nov 23 09:40:26 1998 John W. Eaton <address@hidden>
* input.cc (initialize_readline): Set rl_readline_name and
rl_terminal_name before calling rl_initialize.
*** src/input.cc~ Fri May 15 21:48:07 1998
--- src/input.cc Mon Nov 23 09:53:56 1998
***************
*** 995,1009 ****
void
initialize_readline (void)
{
// Set things up internally in case some function that uses readline
// (currently Fclc(), maybe others) is called before readline().
rl_initialize ();
- // Allow conditional parsing of the ~/.inputrc file
-
- rl_readline_name = "Octave";
-
// Tell the completer that we want to try first.
rl_attempted_completion_function = (CPPFunction *) command_completer;
--- 995,1011 ----
void
initialize_readline (void)
{
+ // Allow conditional parsing of the ~/.inputrc file based on the
+ // program name and terminal type.
+
+ rl_readline_name = "Octave";
+ rl_terminal_name = getenv ("TERM");
+
// Set things up internally in case some function that uses readline
// (currently Fclc(), maybe others) is called before readline().
rl_initialize ();
// Tell the completer that we want to try first.
rl_attempted_completion_function = (CPPFunction *) command_completer;