[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-readline] passing data callback of rl_add_defun
From: |
Chet Ramey |
Subject: |
Re: [Bug-readline] passing data callback of rl_add_defun |
Date: |
Tue, 4 Sep 2018 10:42:27 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 9/2/18 6:37 PM, Tom Tromey wrote:
> Hi.
>
> I'd like to be able to let users add new readline functions via a
> scripting language. To this end, what I'd like is to be able to pass a
> bit of arbitrary data to rl_add_defun or rl_bind_key, and then have this
> data be later passed, verbatim, to the callback.
>
> So, something like:
>
> typedef int rl_command_funcx_t (int, int, void *);
> int rl_add_defunx (const char *name, rl_command_funcx_t *function,
> void *user_data, int key)
>
> (The names here are just placeholders.)
>
> I can take a stab at this if desired.
Sure, I'd be interested in this. It's close enough to bash-5.0/readline-8.0
going into beta that I'm skeptical it would be ready in time for that, but
certainly for the next major release.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU address@hidden http://tiswww.cwru.edu/~chet/