Skip to content

feat(output): implement no-color and no-emoji flags for customizable output#18

Merged
yarlson merged 1 commit into
mainfrom
no-color
Aug 3, 2025
Merged

feat(output): implement no-color and no-emoji flags for customizable output#18
yarlson merged 1 commit into
mainfrom
no-color

Conversation

@yarlson

@yarlson yarlson commented Aug 3, 2025

Copy link
Copy Markdown
Owner

This commit adds support for configuring output formatting with new flags:
--colors, --emoji, and --no-emoji. It introduces a structured Writer system
that separates content from presentation, allowing for flexible output
styling based on user preferences and terminal capabilities.

@yarlson yarlson requested a review from Copilot August 3, 2025 10:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request implements a comprehensive output formatting system with support for customizable colors and emoji flags. The changes introduce a structured Writer system that separates content from presentation, allowing users to control output styling through --colors, --emoji, and --no-emoji flags while maintaining terminal capability auto-detection.

  • Refactors all hardcoded ANSI color codes and emoji into a centralized output system
  • Adds global flags for controlling colors (auto/always/never) and emoji output
  • Introduces structured error types with getter methods for enhanced error formatting

Reviewed Changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
cmd/output.go New centralized output formatting system with Writer and Message types
cmd/output_test.go Comprehensive tests for the new output system
cmd/root.go Adds global flags and structured error handling
internal/core/errors.go New structured error types with metadata
internal/git/errors.go Removes formatting, adds getter methods for structured errors
internal/fs/errors.go Removes formatting, adds getter methods for structured errors
internal/core/lnk.go Updates to use new structured error constructors
go.mod Updates pflag dependency version
cmd/*.go Updates all command files to use new Writer system
Comments suppressed due to low confidence (1)

go.mod:14

  • The version v1.0.7 of github.com/spf13/pflag does not exist. The latest version as of my knowledge cutoff is v1.0.5. Please verify this version exists or use a valid version.
	github.com/spf13/pflag v1.0.7 // indirect

Comment thread cmd/output.go Outdated
Comment thread cmd/add.go
Comment thread cmd/output.go Outdated
Add new output formatting system with flags for color and emoji control:
- Introduce OutputConfig and Writer structs for flexible output handling
- Add --colors and --emoji/--no-emoji global flags
- Refactor commands to use new Writer for consistent formatting
- Separate error content from presentation for better flexibility
@yarlson

yarlson commented Aug 3, 2025

Copy link
Copy Markdown
Owner Author

Implements #17

@yarlson yarlson merged commit 30ab78d into main Aug 3, 2025
8 checks passed
@yarlson yarlson deleted the no-color branch November 25, 2025 05:48
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