mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
clear screen and show cursor when attaching to container
This commit is contained in:
parent
9bf57b0063
commit
4da06790a9
1 changed files with 3 additions and 0 deletions
|
|
@ -386,6 +386,9 @@ func (c *Container) Attach() error {
|
||||||
// read output from container
|
// read output from container
|
||||||
go func() {
|
go func() {
|
||||||
output := os.Stdout
|
output := os.Stdout
|
||||||
|
clearScreen := "\033[2J"
|
||||||
|
showCursor := "\033[?25h"
|
||||||
|
_, _ = io.Copy(output, strings.NewReader(clearScreen+showCursor))
|
||||||
_, _ = io.Copy(output, hijack.Conn)
|
_, _ = io.Copy(output, hijack.Conn)
|
||||||
channel <- syscall.SIGINT
|
channel <- syscall.SIGINT
|
||||||
}()
|
}()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue