term: support pluggable history

Expose a new History interface that allows replacement of the default
ring buffer to customize what gets added or not; as well as to allow
saving/restoring history on either the default ringbuffer or a custom
replacement.

Fixes golang/go#68780

Change-Id: I7e61dc6bb438749c8502223705518ef8ff9025b4
GitHub-Last-Rev: 621281355fd577da77f135c4e15552eba3ead584
GitHub-Pull-Request: golang/term#20
Reviewed-on: https://go-review.googlesource.com/c/term/+/659835
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Jorropo <jorropo.pgm@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Austin Clements <austin@google.com>
1 file changed
tree: 8cbd740a2fc2a2a892f38d6eaed49c948dec4d68
  1. codereview.cfg
  2. CONTRIBUTING.md
  3. go.mod
  4. go.sum
  5. LICENSE
  6. PATENTS
  7. README.md
  8. term.go
  9. term_plan9.go
  10. term_test.go
  11. term_unix.go
  12. term_unix_bsd.go
  13. term_unix_other.go
  14. term_unsupported.go
  15. term_windows.go
  16. terminal.go
  17. terminal_test.go
README.md

Go terminal/console support

Go Reference

This repository provides Go terminal and console support packages.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.

The git repository is https://go.googlesource.com/term.

The main issue tracker for the term repository is located at https://go.dev/issues. Prefix your issue with “x/term:” in the subject line, so it is easy to find.