Skip to content

Provide a context manager for automatic style reset #137

@hbisneto

Description

@hbisneto

Problem: Styles persist if exceptions occur before RESET_ALL is emitted.

Why it matters: Prevents “leaking” colors/styles in logs and complex output flows.

Proposed solution: Add with console.suspend(): ... that guarantees RESET_ALL on exit (even on exceptions). Internally, store current state and restore/reset around the block.

Notes: Ensure nesting works correctly; do not interfere with existing chaining behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    Console ModuleRelated to the "Console" module inside FileSystemPro

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions