Hi,

I am trying to use rl_bind_key with a sample code below.
When I run the compiled binary and hit semi-colon key, it should print
[semi colon] instead of [;].
But it prints [;].

This sample code properly works when I complied it on Cent-OS6.5 (Readline
6.0.4).

Is this a bug? Or Is there any way to make it works?


[The version number and release status of Readline]
6.3.6-release (installed via homebrew)

[The machine and OS that it is running on]
Mac Book Air 2012 Mid
Mac OSX 10.9.5 (Mavericks)

[A list of the compilation flags or the contents of `config.h', if
appropriate]
N/A

[a description of the bug]
rl_bind_key dose not work when compiled on Mac OSX.

sample code
----------------------------
#include <stdlib.h>
#include <stdio.h>
#include <readline/readline.h>

int my_bind_func(int count, int key) ;

int
main(void) {
    while(1){
        rl_bind_key (';', my_bind_func);
        readline("prompt> ");
    }
    return EXIT_SUCCESS;
}

int my_bind_func(int count, int key) {
    printf("semi colon\n");
    return 0;
}
----------------------------

[complie command]
gcc -lreadline sample.c


[a recipe for recreating the bug reliably]
See above.

[a fix for the bug if you have one!]
N/A

-----------------------------
Sincerely Yours

Ryo Tomidokoro
_______________________________________________
Bug-readline mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-readline

Reply via email to