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

Fix terminal width detection on macOS #1150

Merged
merged 1 commit into from
Aug 21, 2020
Merged

Fix terminal width detection on macOS #1150

merged 1 commit into from
Aug 21, 2020

Conversation

electrum
Copy link
Contributor

stty on macOS outputs the value before the name, like this:

speed 9600 baud; 40 rows; 80 columns;

Rather than trying to fix the regex to match either one, we can use the simpler tputs cols command.

@codecov-commenter
Copy link

codecov-commenter commented Aug 20, 2020

Codecov Report

Merging #1150 into master will increase coverage by 0.01%.
The diff coverage is 50.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1150      +/-   ##
============================================
+ Coverage     94.28%   94.30%   +0.01%     
  Complexity      455      455              
============================================
  Files             2        2              
  Lines          6665     6667       +2     
  Branches       1790     1792       +2     
============================================
+ Hits           6284     6287       +3     
+ Misses          104      102       -2     
- Partials        277      278       +1     
Impacted Files Coverage Δ Complexity Δ
src/main/java/picocli/CommandLine.java 94.14% <50.00%> (+0.01%) 314.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update de96892...304ded1. Read the comment docs.

@remkop remkop added type: bug 🐛 theme: integration An issue or change related to integration with other frameworks, shells or operating systems theme: shell An issue or change related to interactive (JLine) applications labels Aug 21, 2020
@remkop remkop added this to the 4.6 milestone Aug 21, 2020
@remkop remkop merged commit 68eda6a into remkop:master Aug 21, 2020
@remkop
Copy link
Owner

remkop commented Aug 21, 2020

Merged into master.
I guess this never worked on macOS; unfortunately I don't have access to a mac so I could not test...
Thank you very much for your contribution!

@electrum electrum deleted the width branch August 21, 2020 15:34
@remkop remkop modified the milestones: 4.6, 4.5.1 Aug 25, 2020
@remkop
Copy link
Owner

remkop commented Aug 26, 2020

@electrum Picocli 4.5.1 has been released, including your fix for this issue.
Thanks again for the contribution!

@electrum
Copy link
Contributor Author

Thanks @remkop! I tested that version and confirmed the wrapping works.

@remkop
Copy link
Owner

remkop commented Aug 28, 2020

Excellent!
Thanks again for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: integration An issue or change related to integration with other frameworks, shells or operating systems theme: shell An issue or change related to interactive (JLine) applications type: bug 🐛
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants