ishell
ishell copied to clipboard
ClearScreen function corrected
I noticed that we when performed ClearScreen operation on the ishell, sometimes old values from the previous screen were still displayed. This was because in the package github.com/abiosoft/readline, writer.Write([]byte("\033[H"))
was used to clear the screen. However, we can simply do writer.Write([]byte("\033[H\033[2J"))
to deal with this. It successfully clears the whole screen.
I also eliminated the need for external reference to readline package. We can use the io.Writer object of ishell directly to clear the screen.
I am attaching a screenshot for reference. The "ed ?" at the end of the first line should not be there in case of clearScreen as this was pasted from the previous screen.
#130