buildx icon indicating copy to clipboard operation
buildx copied to clipboard

monitor: add common shell features to dev prompt

Open tonistiigi opened this issue 3 years ago • 5 comments

This makes the monitor mode from —invoke more user friendly by enabling features user might expect from dev shell.

Interactive mode now has colors, history and keyboard control for movement (arrows, moving to beginning/end, by word, emacs controls etc).

Opening as draft. If this solution (and base library it uses) seems desirable then some updates are needed in go-prompt (or fork) to make it more configurable (currently made changes in vendor).

@ktock

tonistiigi avatar Aug 22 '22 00:08 tonistiigi

SGTM, thank you!

ktock avatar Aug 22 '22 13:08 ktock

@tonistiigi what changes would be needed in go-prompt? Would it be feasible to try and take this for v0.11?

jedevc avatar Apr 11 '23 15:04 jedevc

see the changes in vendor https://github.com/docker/buildx/pull/1289/commits/6e05092055d20af2bded2b5c9fdca9a7b53512cb

tonistiigi avatar Apr 12 '23 02:04 tonistiigi

Looking through go-prompt, the maintainer seems inactive, so it seems likely we'd probably have to fork if we need changes.

jedevc avatar Apr 12 '23 08:04 jedevc

Looking through go-prompt, the maintainer seems inactive, so it seems likely we'd probably have to fork if we need changes.

https://github.com/erikgeiser/promptkit and https://github.com/charmbracelet/bubbletea looks to be reliable alternatives.

crazy-max avatar Oct 23 '23 09:10 crazy-max