Export `rl_readline_name` cell to Ruby interface
Opened this issue · 0 comments
IIUIC, the rl_readline_name
attribute allows per-application customisations in .inputrc
. From man readline
concerning the $it application/$endif
construct:
application
The application construct is used to include application-specific settings.
Each program using the readline library sets the application name,
and an initialization file can test for a particular value. This could be used
to bind key sequences to functions useful for a specific program. For instance,
the following command adds a key sequence that quotes the current or
previous word in bash:
$if Bash
# Quote the current or previous word
"\C-xq": "\eb\"\ef\""
$endif
The current implementation arrogates this capability to itself, preventing its use by Ruby application developers. Currently the readline
gem hard-codes this to (char *)"Ruby"
. However, a compiler (interpreter) isn't really an application, particularly since it itself is not using the readline
library. That seems to be more appropriately the province of things written in Ruby. And then only if they choose to change it from the "Ruby"
default. Note that the documentation explicitly says: "Each program using the readline library sets the application name." I offer that the Ruby interpreter binary is not "the application" by this documentation.
Therefore, this is a FREQ that this cell be exposed to the Ruby level in the gem code, allowing Ruby code developers to set this according to their own application needs.
Thanks!