ruby / ruby/readline-ext

Export `rl_readline_name` cell to Ruby interface

Open
#20 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
14
Forks
7
PR merge metrics
No merged PRs in 30d

Description

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!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the readline gem code that hard-codes the application name to (char *)"Ruby" and the surrounding Ruby interface. Read the GNU Readline documentation for rl_readline_name and determine how it should be exposed. Done means Ruby applications can set the cell while the current default behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, ruby
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.