3mux icon indicating copy to clipboard operation
3mux copied to clipboard

[Question]: willing to make vterm into a separate lib?

Open erikh opened this issue 4 years ago • 7 comments

I'm curious, I have a couple of tools which could benefit from a comprehensive virtual terminal.

Thanks!

erikh avatar Apr 12 '20 21:04 erikh

Absolutely! I plan on refactoring 3mux this week after receiving some helpful bug reports. I'll use that as an opportunity to make vterm usable on its own.

For the foreseeable future, I think most vterm bugs will be found through 3mux. It would be helpful to share an issue tracker between 3mux and vterm (with special tags to specify which of the two is broken).

For this reason, would it be okay if vterm remains under this repo, but importable on its own via github.com/aaronjanse/3mux/vterm?

Either way, I'll make sure vterm's gets some documentation love.

aaronjanse avatar Apr 12 '20 21:04 aaronjanse

That’s perfect assuming it can be treated as public api. Happy to consume and patch it this way.

On Sun, Apr 12, 2020 at 2:28 PM Aaron Janse [email protected] wrote:

Absolutely! I plan on refactoring 3mux this week after receiving some helpful bug reports. I'll use that as an opportunity to make vterm usable on its own.

For the foreseeable future, I think most vterm bugs will be found through 3mux. It would be helpful to share an issue tracker between 3mux and vterm (with special tags to specify which of the two is broken).

For this reason, would it be okay if vterm remains under this repo, but importable on its own via github.com/aaronjanse/3mux/vterm?

Either way, I'll make sure vterm's gets some documentation love.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aaronjanse/3mux/issues/20#issuecomment-612678494, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAET25CWQOI3PXHZEO3VODRMIXBPANCNFSM4MGSAHUA .

erikh avatar Apr 12 '20 22:04 erikh

Does this sound good for a rough idea for a vterm API?

  • rune channel for input
  • interface for rendering output (color, set char at position, etc)

aaronjanse avatar Apr 13 '20 19:04 aaronjanse

This would be great! May I suggest using a Write function to accept input, rather than a channel. That way it can satisfy io.Writer interface and users of your library can combine it with other standard library functions (like io.Copy) and 3rd party libraries.

dehorsley avatar Apr 22 '20 06:04 dehorsley

I've already got you covered :wink:

https://github.com/aaronjanse/3mux/blob/438943668efbb16b479eea1867a28bb9f80909f6/vterm/stdout.go#L30

aaronjanse avatar Apr 22 '20 06:04 aaronjanse

A not-yet-stable vterm package is available in v0.3.0. See fuzz/main.go for example usage.

aaronjanse avatar Apr 24 '20 18:04 aaronjanse

Thanks for putting this together!

On Fri, Apr 24, 2020 at 11:28 AM Aaron Janse [email protected] wrote:

A not-yet-stable vterm package is available in v0.3.0. See fuzz/main.go for example usage.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aaronjanse/3mux/issues/20#issuecomment-619175042, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAET25BIXJEPRHI7LLYZMLROHK4JANCNFSM4MGSAHUA .

erikh avatar Apr 26 '20 02:04 erikh