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

Progress bar is too large #13

Closed
ellishg opened this issue Apr 15, 2020 · 4 comments · Fixed by #14
Closed

Progress bar is too large #13

ellishg opened this issue Apr 15, 2020 · 4 comments · Fixed by #14

Comments

@ellishg
Copy link
Contributor

ellishg commented Apr 15, 2020

When copying, the progress bar is longer than the size of my terminal and it overflows to the next line. This is what I get when I copy a file.

$ cargo run A.mp4 B.mp4
    Finished dev [unoptimized + debuginfo] target(s) in 0.11s
     Running `target/debug/xcp A.mp4 B.mp4`
[00:00:00] [--------------------------------------------------------------------[00:00:00] 
[#############>------------------------------------------------------[00:00:00] 
[####################>-----------------------------------------------[00:00:00] 
[###########################>----------------------------------------[00:00:00] 
[########################################>---------------------------[00:00:00] 
[###############################################>--------------------[00:00:00] 
[######################################################>-------------[00:00:00] 
[#############################################################>------[00:00:00] 
[####################################################################[00:00:00] 
[####################################################################[00:00:00] 
[###############################################################################
#] 751.60MB/751.60MB (0s)
@tarka
Copy link
Owner

tarka commented Apr 15, 2020

Thanks for the report. Can you tell me the OS, terminal, and size of the terminal window?

@ellishg
Copy link
Contributor Author

ellishg commented Apr 15, 2020

$ uname -r
5.6.3-arch1-1
$ gnome-terminal --version
# GNOME Terminal 3.36.1.1 using VTE 0.60.1 +BIDI +GNUTLS +ICU +SYSTEMD
$ tput cols
80
$ tput lines
24

@tarka
Copy link
Owner

tarka commented Apr 15, 2020

Confirmed on Debian; I'll take a look.

@ellishg
Copy link
Contributor Author

ellishg commented Apr 15, 2020

You can use wide_bar here

.template("[{elapsed_precise}] [{bar:80.cyan/blue}] {bytes}/{total_bytes} ({eta})")

I can make a pull request.

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

Successfully merging a pull request may close this issue.

2 participants