Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear screen not working? #130

Open
brianvoe opened this issue Feb 27, 2020 · 1 comment
Open

Clear screen not working? #130

brianvoe opened this issue Feb 27, 2020 · 1 comment

Comments

@brianvoe
Copy link

brianvoe commented Feb 27, 2020

So after a checklist i run ClearScreen() but it looks as if the old values are still showing from before. Below are some screen shots and basically the code im running.

Screen Shot 2020-02-27 at 11 13 55 AM

Screen Shot 2020-02-27 at 11 16 09 AM

shell.AddCmd(&ishell.Cmd{
	Name: "checklist",
	Help: "checklist prompt",
	Func: func(c *ishell.Context) {
		choices := c.Checklist(options, text, nil)

		if len(choices) > 0 && choices[0] != -1 {
			c.ClearScreen()
			c.Println(green("Modules that were updated!!!"))
			for _, i := range choices {
				c.Println(options[i])
			}
		}

		shell.Close()
	},
})
@shadowshot-x
Copy link

I am Facing the same issue. Seems to be some problem in github.com/abiosoft/readline. This can be resolved easily although. I have raised a PR. Just needed to modify the clearScreen function a bit in utils_unix.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants