-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Closed
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
terminal.ReadLine() does not recognize the forward-delete key escape sequence \x1b[3~; it gets silently discarded, which makes the readline experience weird for folks who use the delete key.
Reproduce, as of x/term at 3863673230bd2f654d5c3749dc90e6d130067dd6:
package main
import (
"fmt"
"os"
"golang.org/x/term"
)
func main() {
s, err := term.MakeRaw(int(os.Stdin.Fd()))
if err != nil {
panic(err)
}
defer term.Restore(int(os.Stdin.Fd()), s)
t := term.NewTerminal(os.Stdin, "> ")
fmt.Fprintln(t, "type text, try out delete/backspace, hit enter at end of line to exit:")
t.ReadLine()
}I'm willing to fix, if somone will review. (I don't see an owner at https://dev.golang.org/owners.)
ldemailly and linsite
Metadata
Metadata
Assignees
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.