Skip to content

Add AICT_COLOR=1 environment variable for ANSI color support in plain text mode #26

@github-actions

Description

@github-actions

Description

When --plain is used interactively, output is plain monochrome text. Add opt-in ANSI color support via AICT_COLOR=1 to make tools like aict ls --plain and aict grep --plain more usable at the terminal — without affecting XML/JSON output at all.

Color Conventions

Entry type Color
Directories Bold blue
Executables Bold green
Symlinks Bold cyan
Binary files Red
grep matches Yellow highlight
Errors Bold red

Rules

  • Only activates when AICT_COLOR=1 AND --plain is set
  • Never affects --xml or --json output
  • Colors are stripped when stdout is not a TTY (pipe-safe)
  • AICT_COLOR=0 or NO_COLOR=1 explicitly disables

Affected Tools

ls, grep, find, diff, stat plain text modes

Related

internal/xml/encoder.go — add IsColorMode() helper similar to IsXMLMode()

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions