Skip to content

fix: Legacy Windows CMD formatting differently than other shells#103

Merged
DylanDevelops merged 1 commit intomainfrom
ravel/fix-windows-newline
Mar 28, 2026
Merged

fix: Legacy Windows CMD formatting differently than other shells#103
DylanDevelops merged 1 commit intomainfrom
ravel/fix-windows-newline

Conversation

@DylanDevelops
Copy link
Copy Markdown
Owner

Pull Request Checklist

  • I have read and followed the contribution guidelines.
  • My pull request targets the main branch of tmpo.
  • I have tested these changes locally on my machine.

Closes #72

Description

This pull request introduces a new utility for detecting legacy Windows CMD shells and updates the UI logic to improve compatibility with different terminal environments. It also includes minor enhancements to the version display output and its update check messaging.

Shell detection and UI compatibility:

  • Added the IsLegacyWindowsCMD function in internal/shell/shell.go to detect if the application is running in a legacy Windows CMD shell, and comprehensive tests for this logic in internal/shell/shell_test.go. [1] [2]
  • Updated internal/ui/ui.go to conditionally print a newline in NewlineBelow() only if not running in a legacy Windows CMD shell, improving output formatting on different platforms. [1] [2]

Version command output improvements:

  • Changed DisplayVersionWithUpdateCheck() and GetVersionOutput() in cmd/utilities/version.go to refine the formatting of version and changelog output, and to more cleanly separate update checks from the main output.
  • Improved the update notification formatting in checkForUpdates() to add spacing and remove redundant newlines, resulting in a cleaner display.

Screenshots

image

@DylanDevelops DylanDevelops merged commit e0fc2b0 into main Mar 28, 2026
5 checks passed
@DylanDevelops DylanDevelops deleted the ravel/fix-windows-newline branch March 28, 2026 04:33
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.

Two newlines instead of intended one after each command output

1 participant