octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #49323] Readline library does not support vi-m


From: Rik
Subject: [Octave-bug-tracker] [bug #49323] Readline library does not support vi-mode correctly
Date: Wed, 12 Oct 2016 21:40:37 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #3, bug #49323 (project octave):

This seems to be related, but we are overriding parts of the user's inputrc
with Octave's sitewide version.  With the .inputrc file from comment #2, try


octave-cli --no-init-file
<Ctrl+g>
\C-v outputs 


Despite having mapping the up arrow to "Hello" there is no mention of it.

Now try


octave-cli --no-site-file
<Ctrl+g>
\e[A outputs Hello


This is good.  And what I've *not* done is run the sitewide octaverc file.


## Configure readline using the file inputrc in the Octave startup directory.
readline_read_init_file (sprintf ("%s%s%s",
                                  __octave_config_info__ ("startupfiledir"),
                                  filesep, "inputrc"));


The sitewide inputrc file is


## This file configures the behavior of line-input editing for all
## Octave users when Octave is configured to use GNU Readline library
## for input-line editing.

## history-search-backward:
##
##   Search backward through the history for the string of characters
##   between the start of the current line and the point.  This is a
##   non-incremental search.  Bound to "\e[A", the ANSI escape
##   sequence for the UP arrow.

"\e[A": history-search-backward

## history-search-forward:
##
##   Search forward through the history for the string of characters
##   between the start of the current line and the point.  This is a
##   non-incremental search.  Bound to "\e[B", the ANSI escape
##   sequence for the DOWN arrow.

"\e[B": history-search-forward

## Disable so the usual paste shortcut will work on Windows systems.
## \C-q should still be available for quoted insert.

"\C-v": ""

## In windows, disable audiable bell which is enabled by default
$if term=cygwin
   set bell-style none
$endif



We shouldn't be overriding user selections like this.  I would propose adding
this stanza to the sitewide octaverc file after the first call to
readline_read_init_file.


if (exist ("~/.inputrc", "file"))
  readline_read_init_file ("~/.inputrc");
endif


I tested it and it works for me.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49323>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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