Skip to content

[Improvement] Log wrapping #86

@Antosser

Description

@Antosser

Image

use cliclack::{
    clear_screen, intro,
    log::{info, warning},
};
use console::style;

fn main() -> std::io::Result<()> {
    ctrlc::set_handler(move || {}).expect("setting Ctrl-C handler");

    clear_screen()?;
    intro(style("Break wrap").on_cyan().black())?;

    info("Printing \"0\" 200 times")?;

    warning(['0'; 200].iter().collect::<String>())?;

    Ok(())
}

In a project of mine, I have really long text messages I want to print out and the wrapping looks weird

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions