Skip to content

ssh/terminal: add Terminal.SetEnterClear(bool)#84

Open
shazow wants to merge 2 commits into
golang:masterfrom
shazow:terminal-enterclear
Open

ssh/terminal: add Terminal.SetEnterClear(bool)#84
shazow wants to merge 2 commits into
golang:masterfrom
shazow:terminal-enterclear

Conversation

@shazow

@shazow shazow commented Apr 5, 2019

Copy link
Copy Markdown
Contributor

SetEnterClear controls whether to keep the input line after enter by
pushing \r\n, or to clear the line into a fresh prompt without echoing
it above the prompt.

Using SetEnterClear allows us to control what content is rendered on
enter, so it does not have to be a verbatim echo.

For example, ssh-chat uses this for things like rendering timestamps in front of each
line, or transforming the command in other ways.

The default behavior continues to be backwards-compatible.

@gopherbot

Copy link
Copy Markdown
Contributor

This PR (HEAD: 8ec69c2) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/crypto/+/170861 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Andrey Petrov:

Patch Set 1:

Gentle ping

Would love a review for this.

Merging this would allow me to stop using a forked version of ssh/terminal. :D

Thank you. :)


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@bradfitz bradfitz changed the title sshd/terminal: Add Terminal.SetEnterClear(bool) ssh/terminal: add Terminal.SetEnterClear(bool) Apr 16, 2019
@gopherbot

Copy link
Copy Markdown
Contributor

Message from Brad Fitzpatrick:

Patch Set 2:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

SetEnterClear controls whether to keep the input line after enter by
pushing \r\n, or to clear the line into a fresh prompt without echo'ing
it above the prompt.

Using SetEnterClear allows us to control what content is rendered on
enter, so it does not have to be a verbatim echo.

For example, ssh-chat uses this to render timestamps in front of each
line.

The default behaviour continues to be backwards-compatible.
@shazow shazow force-pushed the terminal-enterclear branch from 8ec69c2 to 2980e83 Compare April 16, 2019 15:43
@gopherbot

Copy link
Copy Markdown
Contributor

This PR (HEAD: 2980e83) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/crypto/+/170861 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Andrey Petrov:

Patch Set 3:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Brad Fitzpatrick:

Patch Set 3:

R=agl

Adam, any thoughts on this? Code & docs seem fine, but I'm not sure whether this functionality is some standard thing with some standard name that other libraries provide.


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Brad Fitzpatrick:

Patch Set 3: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Gobot Gobot:

Patch Set 3:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=fdb03171


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Gobot Gobot:

Patch Set 3: TryBot-Result+1

TryBots are happy.


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Adam Langley:

Patch Set 3:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Andrey Petrov:

Patch Set 3:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Andrey Petrov:

Patch Set 3: Code-Review-1

Please don't merge this yet. This change might have a scenario where it causes a slice out of bounds panic during runtime. I need to investigate further.

Meanwhile, I'd still love Adam's feedback and advice on how to best proceed.


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

This PR (HEAD: 0335b09) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/crypto/+/170861 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Andrey Petrov:

Patch Set 4:

I managed to reproduce the crash that was happening because of the t.cursorX += len(reset) line as a test, and I removed the line for now.

There's no longer a crash, but now there's weird echo indent issues that I have not figured out. I think it's related to the cursor/position math. Resetting t.cursorX, t.cursorY = 0, 0 makes it worse.

I pasted a small demo program here with a screenshot and log of the output: https://gist.github.com/shazow/5cedec7ac685eb6de10f826b22acb01d

I'd appreciate any guidance for what might be going on here.


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Go Bot:

Patch Set 3:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=fdb03171


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Go Bot:

Patch Set 3: TryBot-Result+1

TryBots are happy.


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

jandd added a commit to jandd/crypto that referenced this pull request Jul 7, 2021
Adds support for the Policy URI signature subpacket type from RFC 4880
section 5.2.3.20.
@gopherbot

Copy link
Copy Markdown
Contributor

Message from Andrey Petrov:

Patch Set 4:

I managed to reproduce the crash that was happening because of the t.cursorX += len(reset) line as a test, and I removed the line for now.

There's no longer a crash, but now there's weird echo indent issues that I have not figured out. I think it's related to the cursor/position math. Resetting t.cursorX, t.cursorY = 0, 0 makes it worse.

I pasted a small demo program here with a screenshot and log of the output: https://gist.github.com/shazow/5cedec7ac685eb6de10f826b22acb01d

I'd appreciate any guidance for what might be going on here.


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Andrey Petrov:

Patch Set 1:

Gentle ping

Would love a review for this.

Merging this would allow me to stop using a forked version of ssh/terminal. :D

Thank you. :)


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Brad Fitzpatrick:

Patch Set 2:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Andrey Petrov:

Patch Set 3:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Brad Fitzpatrick:

Patch Set 3:

R=agl

Adam, any thoughts on this? Code & docs seem fine, but I'm not sure whether this functionality is some standard thing with some standard name that other libraries provide.


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Brad Fitzpatrick:

Patch Set 3: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Gopher Robot:

Patch Set 3:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=fdb03171


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Gopher Robot:

Patch Set 3: TryBot-Result+1

TryBots are happy.


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Adam Langley:

Patch Set 3:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Andrey Petrov:

Patch Set 3:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Andrey Petrov:

Patch Set 3: Code-Review-1

Please don't merge this yet. This change might have a scenario where it causes a slice out of bounds panic during runtime. I need to investigate further.

Meanwhile, I'd still love Adam's feedback and advice on how to best proceed.


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Copy link
Copy Markdown
Contributor

Message from Andrey Petrov:

Patch Set 4:

I managed to reproduce the crash that was happening because of the t.cursorX += len(reset) line as a test, and I removed the line for now.

There's no longer a crash, but now there's weird echo indent issues that I have not figured out. I think it's related to the cursor/position math. Resetting t.cursorX, t.cursorY = 0, 0 makes it worse.

I pasted a small demo program here with a screenshot and log of the output: https://gist.github.com/shazow/5cedec7ac685eb6de10f826b22acb01d

I'd appreciate any guidance for what might be going on here.


Please don’t reply on this GitHub thread. Visit golang.org/cl/170861.
After addressing review feedback, remember to publish your drafts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants