help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

inputrc issue


From: John W. Eaton
Subject: inputrc issue
Date: Sun, 16 Oct 2005 12:23:12 -0400

On 16-Oct-2005, Mike Miller wrote:

| How do I get octave to read my ~/.inputrc file on Linux?  Important info:
| 
| Octave 2.1.71 on Red Hat Linux
| 
| When I use the same ~/.inputrc on Cygwin, it works great.  This is my 
| ~/.inputrc:
| 
| "\M-p": history-search-backward
| "\M-n": history-search-forward
| 
| Where does Octave read the global inputrc?

Octave doesn't.  Readline does.  So it happens when readline is
initialized.  But, there is a function in newer versions of Octave to
tell readline to read an init file:

read_readline_init_file is a built-in function

 -- Built-in Function:  read_readline_init_file (FILE)
     Read the readline library initialiazation file FILE.  If FILE is
     omitted, read the default initialization file (normally
     `~/.inputrc'.

Internally, this just sets the global (C, readline library) variable
rl_readline_name to the tilde-expanded, absolute name of FILE, then
calls rl_re_read_init_file (0, 0).  The assumption is that the init
file is read when readline is first initialized, so we call
rl_re_read_init_file instead of rl_read_init_file.  Is that somehow
not happening on your system?  I suppose you could check with a gdb
(try setting a breakpoint in rl_read_init_file):

  gdb octave
  ...
  (gdb) b main
  (gdb) r
  ...
  (gdb) b rl_read_init_file
  (gdb) c
  ...
  
or maybe use strace to see if the ~/.inputrc file is ever opened.

jwe



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]