PTYs, Subsystems, and More
This release is loaded with improvements and new features like support for exec
, server banners, subsystems, and client color profiles. Read on for more!
Exec
and PTYs
At last, now you can get real a PTY for reach SSH connection. This allows you to exec.Command
on the remote. This also means bubbletea.Exec
will now work as expected1!
// Open a file in Vim in Bubble Tea (on the server)
c := wish.Command(m.sess, "vim", "file.txt")
cmd := tea.Exec(c, func(err error) tea.Msg {
if err != nil {
log.Error("vim finished", "error", err)
}
return cmdFinishedMsg{err: err}
})
Lip Gloss Renderers
You can now use MakeRenderer
to create a Lip Gloss renderer for the each user's session. This will suss out the user's terminal and render colors using the best available color profile as well as detect whether the background is dark or light. You can then use that renderer to init your app's styles.
Before this update, it would use the server's environment variables to figure this out, which could cause wrong results, especially when running via Docker/Systemd.
The behavior of MiddlewareWithColorProfile
has also changed: now, the provided color profile will be used as "the minimal color profile supported".
Server Banners
Time to fire up figlet
: server banners are here! Enjoy! 🫶
Subsystems
You can now use the WithSubsystem
option to add handlers for specific subsystems (for instance, SFTP).
Git Improvements
If you ever wanted to use Wish's private ensureRepo
function, you'll be happy to know it is now public (i.e. EnsureRepo
). Ensure repo creates Git repos on demand.
Go 1.19
Wish now requires Go 1.19 to run.
Docs
We added new examples in the examples
directory, as well as updated many of the previously existing ones.
Check them out to learn more about Wish. 😬
Changelog
New Features
- e5d20f5: feat: WithSubsystem (#224) (@caarlos0)
- ef54347: feat: add wish.Command and wish.Cmd (#229) (@caarlos0)
- 8aefea8: feat: make EnsureRepo public (#211) (@caarlos0)
- ddb47df: feat: support server banners (#210) (@caarlos0)
- 714e30a: feat: use go 1.19 (#189) (@caarlos0)
- 7f44d6d: feat: use real pty (#197) (@caarlos0)
Bug fixes
- 82263ca: fix: do not kill server on conpty close on windows (#231) (@caarlos0)
- 83e64f6: fix: elapsed middleware package name (#206) (@dezren39)
Dependency updates
- dee9e71: feat(deps): bump github.com/charmbracelet/bubbletea (#200) (@dependabot[bot])
- 472a6ab: feat(deps): bump github.com/charmbracelet/log from 0.2.5 to 0.3.0 (#188) (@dependabot[bot])
- c0a21c1: feat(deps): bump github.com/charmbracelet/log from 0.3.0 to 0.3.1 (#193) (@dependabot[bot])
- cb19676: feat(deps): bump github.com/cloudflare/circl from 1.3.3 to 1.3.7 (#217) (@dependabot[bot])
- 1b87f7b: feat(deps): bump github.com/go-git/go-git/v5 from 5.10.0 to 5.10.1 (#195) (@dependabot[bot])
- b329826: feat(deps): bump github.com/go-git/go-git/v5 from 5.10.1 to 5.11.0 (#199) (@dependabot[bot])
- fe9563c: feat(deps): bump golang.org/x/crypto from 0.14.0 to 0.15.0 (#190) (@dependabot[bot])
- 2a07e04: feat(deps): bump golang.org/x/crypto from 0.15.0 to 0.16.0 (#192) (@dependabot[bot])
- b3a8a2d: feat(deps): bump golang.org/x/crypto from 0.16.0 to 0.17.0 (@dependabot[bot])
- 8e099f1: feat(deps): bump golang.org/x/crypto from 0.17.0 to 0.18.0 (#222) (@dependabot[bot])
- 40dcd79: feat(deps): bump golang.org/x/sync from 0.4.0 to 0.5.0 (#186) (@dependabot[bot])
- 3e6f92a: feat(deps): bump golang.org/x/sync from 0.5.0 to 0.6.0 (#215) (@dependabot[bot])
- 57958d3: feat(deps): bump golang.org/x/time from 0.3.0 to 0.4.0 (#187) (@dependabot[bot])
- d8d92bc: feat(deps): bump golang.org/x/time from 0.4.0 to 0.5.0 (#194) (@dependabot[bot])
Documentation updates
- 54e6a3d: docs: add an example of reverse proxy (#214) (@caarlos0)
- f3d7e48: docs: add elapsed middleware to an example (#212) (@caarlos0)
- e116a63: docs: add more details to elapsed (#216) (@dezren39)
- 502154d: docs: document command better (@caarlos0)
- 0337c4b: docs: example of MakeRenderer (@caarlos0)
- 91171be: docs: example using multiple authentication methods (@caarlos0)
- 1fbb5ec: docs: fix broken examples (@caarlos0)
- d47ec1a: docs: update ratelimiter docs (@caarlos0)
- ee243c6: docs: update wish.Command docs (@caarlos0)
Other work
- 4a0119d: build(deps): bump github.com/cloudflare/circl in /examples (#218) (@dependabot[bot])
- 0345b92: build(deps): bump golang.org/x/crypto from 0.16.0 to 0.17.0 in /examples (@dependabot[bot])
- a85a96d: ci: fix golangci-lint configuration (@caarlos0)
- e5a919c: ci: update dependabot (@caarlos0)
Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
Windows support is limited, see charmbracelet/ssh#20 and #232. ↩
Footnotes