Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Reline doesn't respect EOF from the terminal

Aperta
#501 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
ruby
Ambito
cli

Direzione di ricerca

Inizia riproducendo il comportamento del terminale con stty eof ^K e Reline.readline, quindi traccia il modo in cui Reline.readline gestisce i caratteri di controllo e EOF. Confronta il comportamento osservato con gli esempi di readline nell’issue. Il lavoro è completato quando il carattere EOF configurato del terminale termina il processo, mentre i normali controlli delete e kill-line mantengono il comportamento previsto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

When the terminal uses a different control character for EOF, it's not respected by reline.

By comparison with readline:

$ stty eof ^K # stty eof ^D to restore
$ ruby -rreadline -e Readline.readline
a^A^D^D^K

I type a, then ^A to go at the beginning of the line, then ^D to remove the a, the second ^D doesn't do anything, but ^K sends the end-of-file and ends the process.

$ stty eof ^K # stty eof ^D to restore
$ ruby -rreadline -e Readline.readline
a^A^K^K

I type a, then ^A to go at the beginning of the line, then ^K removes until the end of the line (kill-line), the second ^K sends the end-of-file and ends the process.


With reline:

$ stty eof ^K # stty eof ^D to restore
$ ruby -rreline -e Reline.readline
a^A^D^D

I type a, then ^A to go at the beginning of the line, then ^D to remove the a, the second ^D sends the end-of-file and ends the process.

$ stty eof ^K # stty eof ^D to restore
$ ruby -rreline -e Reline.readline
a^A^K^K^D

I type a, then ^A to go at the beginning of the line, then ^K removes until the end of the line (kill-line), the second ^K doesn't do anything, but ^D sends the end-of-file and ends the process.

Terminal Emulator

Terminal.app on macOS 13.1

Lingua principale
Ruby
Stelle
311
Fork
100
Merge medio
6g 8h
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ruby/reline

Tutte le issue di ruby/reline

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.