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

use term.GetSize #794

Merged
merged 3 commits into from
Sep 1, 2024
Merged

use term.GetSize #794

merged 3 commits into from
Sep 1, 2024

Conversation

asukaminato0721
Copy link
Contributor

fix #787

now for medium length, it won't truncate file name.

Enter receive code: 4770-citizen-valid-speed
Accept '[Reaktor] Millennium Actress - Sennen Joyuu [1080p][x265][10-bit][Dual-Audio].mkv' (1.3 GB)? (Y/n) 

Receiving (<-127.0.0.1:38286)
[Reaktor] Millennium Actress - Sennen Joyuu [1080p][x265][10-bit][Dual-Audio].mkv  18% |███                 | (255 MB/1.4 GB, 74 MB/s) [3s:15s]^C⏎           

@schollz
Copy link
Owner

schollz commented Aug 30, 2024

@asukaminato0721 this isn't working for me on Linux, i.e. a super long filename spills over:

image

@asukaminato0721
Copy link
Contributor Author

now it works with long file name.

Accept '[Reaktor] Millennium Actress - Sennen Joyuu [1080p][x265][10-bit][Dual-Audio]1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111.mkv' (1.3 GB)? (Y/n) Y

Receiving (<-127.0.0.1:58930)
[Reaktor] Millennium Actress - Sennen Joyuu [1080p][x...  11% |██                  | (169 MB/1.4 GB, 93 MB/s) [1s:13s]^C⏎     

I set max(20, width-70)

20 is the original width, -70 is to fit with the progress bar.

@schollz schollz merged commit 0017def into schollz:main Sep 1, 2024
1 of 2 checks passed
@asukaminato0721 asukaminato0721 deleted the term.GetSize branch September 2, 2024 05:08
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 this pull request may close these issues.

Truncated filenames in terminal output
2 participants