x/term: exposing history based on proposal discussion
Version 2 of https://github.com/golang/term/pull/15 - Much less footprint/changes in x/term in exchange for duplication and much more in callers (https://github.com/fortio/terminal/pull/85), including fairly tricky/obscure handling of adding to history automatically or not.
Fixes https://github.com/golang/go/issues/68780#issuecomment-2737508310
This PR (HEAD: b9f8be7d8922fc20afb6c02a2336a3b4604c029b) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/term/+/659835.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
Message from Gopher Robot:
Patch Set 1:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/659835. After addressing review feedback, remember to publish your drafts!
This PR (HEAD: 6b019585c7c30a2a8c33d332ed207ebefe555237) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/term/+/659835.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
This PR (HEAD: fe1e3a49b77ffcd52d6fe97c134b0b57c62dd83d) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/term/+/659835.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
Message from Laurent Demailly:
Patch Set 4:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/659835. After addressing review feedback, remember to publish your drafts!
This PR (HEAD: a5f4981492124f4479746ef2c5602559e0a4a8bb) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/term/+/659835.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
This PR (HEAD: bad1ef1afeb0042dac02fded94dee1524e9d3074) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/term/+/659835.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
Message from Ian Lance Taylor:
Patch Set 7: Hold+1
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/659835. After addressing review feedback, remember to publish your drafts!
This PR (HEAD: 13c58aae88fc4a72c42e43bed5d628e9c92237c0) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/term/+/659835.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
This PR (HEAD: ba6dd5cfb0cd3b72adac396893918a276c23c6b7) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/term/+/659835.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
Message from Laurent Demailly:
Patch Set 10:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/659835. After addressing review feedback, remember to publish your drafts!
Message from Sean Liao:
Patch Set 10:
(8 comments)
Please don’t reply on this GitHub thread. Visit golang.org/cl/659835. After addressing review feedback, remember to publish your drafts!
This PR (HEAD: 5e07c1517b2728f32a143497777d25a6334cb9db) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/term/+/659835.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
Message from Laurent Demailly:
Patch Set 10:
(7 comments)
Please don’t reply on this GitHub thread. Visit golang.org/cl/659835. After addressing review feedback, remember to publish your drafts!
Message from Laurent Demailly:
Patch Set 12:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/659835. After addressing review feedback, remember to publish your drafts!
Message from Austin Clements:
Patch Set 13:
(6 comments)
Please don’t reply on this GitHub thread. Visit golang.org/cl/659835. After addressing review feedback, remember to publish your drafts!
Message from Austin Clements:
Patch Set 13:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/659835. After addressing review feedback, remember to publish your drafts!
Message from Laurent Demailly:
Patch Set 13:
(6 comments)
Please don’t reply on this GitHub thread. Visit golang.org/cl/659835. After addressing review feedback, remember to publish your drafts!
Message from Laurent Demailly:
Patch Set 13:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/659835. After addressing review feedback, remember to publish your drafts!
This PR (HEAD: 57b351e5ca74810484dc0d94d9d595f70a9f53e9) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/term/+/659835.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
This PR (HEAD: d9f673b367ed32531331def311e3d9f3b58ebf7f) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/term/+/659835.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
Message from Laurent Demailly:
Patch Set 14:
(3 comments)
Please don’t reply on this GitHub thread. Visit golang.org/cl/659835. After addressing review feedback, remember to publish your drafts!
Message from Laurent Demailly:
Patch Set 14:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/659835. After addressing review feedback, remember to publish your drafts!
Message from Laurent Demailly:
Patch Set 15:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/659835. After addressing review feedback, remember to publish your drafts!
Message from Austin Clements:
Patch Set 15: Code-Review+2 Commit-Queue+1
(2 comments)
Please don’t reply on this GitHub thread. Visit golang.org/cl/659835. After addressing review feedback, remember to publish your drafts!
Message from Go LUCI:
Patch Set 15:
Dry run: CV is trying the patch.
Bot data: {"action":"start","triggered_at":"2025-04-17T18:26:17Z","revision":"81fed751da2afa76e0874b2d4b5bcd05120518d0"}
Please don’t reply on this GitHub thread. Visit golang.org/cl/659835. After addressing review feedback, remember to publish your drafts!
Message from Austin Clements:
Patch Set 15: -Commit-Queue
Please don’t reply on this GitHub thread. Visit golang.org/cl/659835. After addressing review feedback, remember to publish your drafts!
Message from Go LUCI:
Patch Set 15:
This CL has passed the run
Please don’t reply on this GitHub thread. Visit golang.org/cl/659835. After addressing review feedback, remember to publish your drafts!
Message from Go LUCI:
Patch Set 15: LUCI-TryBot-Result+1
Please don’t reply on this GitHub thread. Visit golang.org/cl/659835. After addressing review feedback, remember to publish your drafts!
Message from Michael Pratt:
Patch Set 17: Code-Review+1
Please don’t reply on this GitHub thread. Visit golang.org/cl/659835. After addressing review feedback, remember to publish your drafts!