Tags: fortio/term
Tags
Apply golang#21 to fortio/term release branch Squashed commit of the following: commit 3d202e8 Author: Laurent Demailly <[email protected]> Date: Sun Jul 13 17:27:48 2025 -0700 Handle CR+LF: consume LF after CR, to avoid empty extra lines in dos new line content commit bc5cb00 Author: Laurent Demailly <[email protected]> Date: Fri Jul 11 17:57:31 2025 -0700 keyLF is as much of a key as keyCtrlD so removing the comment commit 48ea529 Author: Laurent Demailly <[email protected]> Date: Fri Jul 11 17:36:03 2025 -0700 missed a spot commit 76633e0 Author: Laurent Demailly <[email protected]> Date: Fri Jul 11 16:57:45 2025 -0700 Allow multi-line bracketed paste to not create single line with LF entry
Rebase from x/term master (includes my windows fix) (#9) * x/term: set missing VIRTUAL_TERMINAL_INPUT flag on Windows With this change the arrow keys work with Windows 11 Terminal After verifying https://github.com/containerd/console did work fine, unlike x/term, it's because they have: https://github.com/containerd/console/blob/v1.0.4/console_windows.go#L194 using the same flag fixed x/term for my program Small e2e test reproducing the issue and showing it being fixed can be ran using go run fortio.org/terminal/[email protected] # has the fix (or @latest) go run fortio.org/terminal/[email protected] -history .history # does not have working arrow keys/this fix Fixes golang/go#68830 Change-Id: If20addd054c76b889a52f933695467812be72306 GitHub-Last-Rev: 68e3ca0 GitHub-Pull-Request: golang#17 Reviewed-on: https://go-review.googlesource.com/c/term/+/603960 LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Commit-Queue: Ian Lance Taylor <[email protected]> Reviewed-by: Alex Brainman <[email protected]> * go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: Ia875ad082f993ce02f2cf97d6d3b318091360433 Reviewed-on: https://go-review.googlesource.com/c/term/+/610637 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Pratt <[email protected]> Auto-Submit: Gopher Robot <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> * go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: I1fc21941bdc8066f3a8d24afdf16e6e10bceaf55 Reviewed-on: https://go-review.googlesource.com/c/term/+/617955 Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: David Chase <[email protected]> Auto-Submit: Gopher Robot <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> * README: don't recommend go get These days people will just import the packages and the go tool will do the right thing. We don't need to explain it. Add a pointer to the git repo, though. For golang/go#62645 Change-Id: I641439c4fa02391fb77b05d639d6815094724a3a Reviewed-on: https://go-review.googlesource.com/c/term/+/624216 Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Commit-Queue: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> * go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: I4ba440821ddd8ce48c2658e67836ff4fbcdd258d Reviewed-on: https://go-review.googlesource.com/c/term/+/626355 Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Gopher Robot <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: David Chase <[email protected]> * go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: I8348c05748f22f6b6701a197b29e8b6dba837d0d Reviewed-on: https://go-review.googlesource.com/c/term/+/633476 Auto-Submit: Gopher Robot <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: David Chase <[email protected]> * go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: Ib4be7af15f194517725e80dde8b52ce59dce04c9 Reviewed-on: https://go-review.googlesource.com/c/term/+/640357 Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Gopher Robot <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: David Chase <[email protected]> * Expose History() AddToHistory() and NewHistory() so users of the library can save and restore the history * prep for release under fortio.org/term (#2) * Don't add adjacent duplicates to history (#3) * Add AutoHistory(false) option (default remains true) to not automatically add to the History (#4) * Add AutoHistory(false) option (default remains true) to not automatically add to the History and let the caller of ReadLine() decide, for instance to only add validated commands * Add ReplaceLatest() to mutate top of history. Add comments. Expose DefaultHistoryEntries as const (#5) * Add ReplaceLatest() to mutate top of history. Add comments. Expose DefaultHistoryEntries as const * Correct godoc for ReplaceLatest * Change history default to 99 from 100 so history printed with %02d looks good (#7) --------- Co-authored-by: Gopher Robot <[email protected]> Co-authored-by: Ian Lance Taylor <[email protected]>
Fix windows not receiving arrow keys (golang/go#68830) (#6)
Add AutoHistory(false) option (default remains true) to not automatic… …ally add to the History (#4) * Add AutoHistory(false) option (default remains true) to not automatically add to the History and let the caller of ReadLine() decide, for instance to only add validated commands