-
Notifications
You must be signed in to change notification settings - Fork 246
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
Support for multi-line progress messages #442
Comments
Which version did you try? It might be helpful to try the latest 0.17 rc. I'm fairly certain there is at least some newline handling in indicatif, although I haven't really tried it myself. I would definitely be open to have something like this in the library, happy to answer questions about the code base if you have any. |
I actually checked out the latest main branch, and tried inserting newlines into a bunch of the examples, which just resulted in a whole lot of output :-P I suppose it's possible that it works for a single progress bar though, I'm not sure I tried that. I'll have a closer look at the codebase and see if I can whip something up. Thanks! |
I've tried to implement this, see #443. I'd be happy about any feedback! |
This was merged, going to close this. |
First of all, thanks for the awesome library! It's been a joy to use so far.
Recently, I've had a few usecases where my CLI apps are running bash scripts or something similar in the background. Of course, I could just show an indeterminate progress spinner here to show that a script is running. However, after using buildkit, which basically shows the last few lines of output for each step being run, and clears them when the step is done, I thought about how to achieve this with this library.
The simplest way to show recent output for progress bars would be to just have multiline progress bars. I could then take e.g. the last three lines of the script output and display them below the progress message. I tried this but newlines are not handled at all by indicatif, resulting in duplicated lines whenever a newline is printed.
I would be open to working on this if this functionality is something you would consider adding in this library. If you need more details or examples of this behavior in other CLI tools, I can provide that.
The text was updated successfully, but these errors were encountered: