Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Export `rl_readline_name` cell to Ruby interface

Đang mở
#20 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
42/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
c, ruby
Lĩnh vực
cli

Hướng nghiên cứu

Kiểm tra mã của readline gem đang hard-code tên ứng dụng thành (char *)"Ruby" và Ruby interface xung quanh. Đọc tài liệu GNU Readline về rl_readline_name và xác định cách nó nên được expose. Hoàn thành khi các ứng dụng Ruby có thể đặt cell này trong khi hành vi mặc định hiện tại vẫn được giữ nguyên.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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!

Ngôn ngữ chính
C
Star
14
Fork
7
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ruby/readline-ext

Tất cả issue của ruby/readline-ext

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.