[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
readline (was: 3 smaller issues: stratup and 2 readline)
From: |
John W. Eaton |
Subject: |
readline (was: 3 smaller issues: stratup and 2 readline) |
Date: |
Wed, 10 Sep 2008 14:23:53 -0400 |
On 10-Sep-2008, Levente Torok wrote:
| 2) This is not clear if it is an inteded behavior or simply something is
forgotten.
| I regularily use octave_history in way that I push up arrow. It worked across
sessions.
| In oct-3 I experienced that the session ending inserts an extra line into the
history
| # Octave 3.0.1, Wed Sep 10 15:04:42 2008 CEST <address@hidden>
| that comes down to the editing.
| Personally, I would avoid it.
Does
history_timestamp_format_string ("");
eliminate the timestamp for you?
| 3) After pressing up arrow and going into the line by pressing left arrow,
the earlier history access is
| not possible. I mean, if I push up arrow again it does nothing. In oct-2 it
returned the even more early
| entered lines. This is the same as bash uses readline and personally I like
this. Is
| it an intended behaviour or a side effect?
I think this happens because now the up and down arrow keys are bound
to the readline functions history-search-backward and
history-search-forward. These commands use the current line to search
the history list. This change was made because we had people
complaining that Matlab had this feature. It is enabled in the
gnu_readline::gnu_readline constructor in liboctave/cmd-edit.cc.
Other than modifying that function, I don't see a way to disable it.
Perhaps instead of doing
// And the history search functions.
octave_rl_add_defun ("history-search-backward",
gnu_readline::history_search_backward,
octave_rl_meta ('P'));
octave_rl_add_defun ("history-search-forward",
gnu_readline::history_search_forward,
octave_rl_meta ('N'));
we could read a default inputrc file for readline. I'd consider a
patch.
You can still use C-p and C-n to move in the history list.
jwe
- 3 smaller issues: stratup and 2 readline, Levente Torok, 2008/09/10
- startup time (was: 3 smaller issues: stratup and 2 readline), John W. Eaton, 2008/09/10
- Re: startup time (was: 3 smaller issues: stratup and 2 readline), Levente Torok, 2008/09/10
- Message not available
- Re: startup time, Levente Torok, 2008/09/11
- Re: startup time, John W. Eaton, 2008/09/11
- Re: startup time, Levente Torok, 2008/09/11
- Re: startup time, John W. Eaton, 2008/09/11
- Re: startup time, Levente Torok, 2008/09/11
- Re: startup time, John W. Eaton, 2008/09/11
readline (was: 3 smaller issues: stratup and 2 readline),
John W. Eaton <=