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

[Feature request] Auto-detect terminal width, support width > length #203

Open
artagnon opened this issue Mar 18, 2021 · 0 comments
Open

Comments

@artagnon
Copy link

Hi,

I'm trying to get the progress bar to fill the terminal width, and I'm using an 80-character terminal, but the following code doesn't seem to work:

    let progress = new ProgressBar(`[${'TeX'.green}]:  |:bar| :current/:total`, {
        width: 80 - 15,
        total: argv._.length,
        incomplete: ' ',
    });

It's like width doesn't do anything at all, I conjecture, because I have only 51 (< 75) items. It would be nice if progress could auto-detect the terminal width, and fill it appropriately.

Thanks.

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

1 participant