abiosoft / ishell

Library for creating interactive cli applications.
MIT License
1.68k stars 195 forks source link

Update part of screen #104

Open MrVine opened 5 years ago

MrVine commented 5 years ago

Is it possible to update concrete line of ishell?

I creating some application, which will return results []*Result slice to user. In my application hard background work should be done for each element of slice, so I want to notify user about current progress by sending new state of *Result item over chan *Result channel.

So, is it possible to update only concrete line of ishell, without re-writing all content of results slice?

abiosoft commented 5 years ago

I don't fully understand what you are trying to do. But sounds like you can make use of the progress bar and simply set your progress like this https://github.com/abiosoft/ishell/blob/master/example/main.go#L144.

MrVine commented 5 years ago

I want to show progress for several lines simultaneously, like during docker pull:

1

Or just update each line, like this:

2

Is it possible with abiosoft/ishell?

abiosoft commented 5 years ago

No, you cannot do that yet. I actually have it listed in the roadmap, may prioritise it.

MrVine commented 5 years ago

Ok, thanks