Skip to content

Properly decide terminal width on non-unix systems#24

Merged
hellflame merged 1 commit intohellflame:masterfrom
xypwn:fix-terminal-width
Jun 11, 2025
Merged

Properly decide terminal width on non-unix systems#24
hellflame merged 1 commit intohellflame:masterfrom
xypwn:fix-terminal-width

Conversation

@xypwn
Copy link
Contributor

@xypwn xypwn commented Jun 10, 2025

Pull Request Process

Before submitting a pull request

Be sure you have the latest code in hand. Pull the master branch

Be sure to make test and keep all test pass

Be sure to make tidy so your code style will keep the same

Be sure to make cover-report to see if any line not covered

Don't Rebase git history

General steps for completing this pull request

Checklist

Does your project contributions have steps to follow before being approved? Tests, documentation changing, etc?

Ensure that your pull request has followed all the steps below:

  • Code compilation
  • All tests passing
  • Extended the documentation, if applicable

Description

Ask the contributor to describe his pull request.

stty isn't available on Windows. This patch uses golang.org/x/term instead to determine the actual terminal width. This makes it work on Windows without issues.

Proposed changes

Ask contributors about why you (or your project maintainers) would accept the pull request. If it solves a previous request, also ask to link to that issue.

This improves the UX on Windows, or any other system where the "stty" command may not be available.

Types of changes

Show in a checkbox-style, the expected types of changes your project is supposed to have:

  • New feature
  • Bugfix
  • Improve
  • So on...

stty isn't available on Windows. This patch uses golang.org/x/term instead to determine the actual terminal width. This makes it work on Windows without issues.
@xypwn
Copy link
Contributor Author

xypwn commented Jun 10, 2025

I accidentally created a previous PR from the wrong branch in my fork (#23). Sorry for duplicate PR.

@hellflame
Copy link
Owner

That's great, thanks for the contribution!

@hellflame hellflame merged commit 5db6772 into hellflame:master Jun 11, 2025
@xypwn xypwn deleted the fix-terminal-width branch June 11, 2025 17:54
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.

2 participants