[R] R readline customization with rl_application_name

Britton Kerin bkerin at fastmail.fm
Wed May 6 03:24:05 CEST 2009


I tried to customize R completion in my .inputrc like this:

    $if RCustomCompletion
      Control-q: "q(save=\"no\")\n"
    $endif

I looked in the R source to find about RCustomCompletion 

    BUBBA$ grep -r 'rl_readline_name' *
    src/unix/sys-std.c:    rl_readline_name = "RCustomCompletion";

but this poster:

    https://stat.ethz.ch/pipermail/r-help/2008-September/173828.html

sounds like he found the same information in the docs somewhere.

But it doesn't seem to work.  Setting the exact same binding
globally (i.e. not in an $if) gives the desired result.  Other
applications seem to work about as expected, for example the
following workaround gives the desired result for the programs
I use regularly:

    Control-q: "q(save=\"no\")\n"
    $if Bash
      Control-q: "\C-d"
    $endif
    $if bc
      Control-q: "\C-d"
    $endif
    $if perldb
      Control-q: "\C-d"
    $endif

Britton




More information about the R-help mailing list