Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Export `rl_readline_name` cell to Ruby interface

未关闭
#20 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
42/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
c, ruby
领域
cli

调研方向

检查将应用程序名称硬编码为 (char *)"Ruby" 的 readline gem 代码以及周围的 Ruby 接口。阅读 GNU Readline 关于 rl_readline_name 的文档,并确定应如何公开它。完成的标准是 Ruby 应用程序可以设置该单元,同时当前的默认行为保持不变。

由索引模型根据 Issue 内容生成。

描述

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!

主要语言
C
星标
14
派生
7
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ruby/readline-ext 的其他 Issue

查看 ruby/readline-ext 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。