Skip to content

fix(options): keep COLUMNS from enabling icons auto - #1843

Open
xfocus3 wants to merge 2 commits into
eza-community:mainfrom
xfocus3:fix/icons-auto-piped-columns
Open

xfocus3 wants to merge 2 commits into
eza-community:mainfrom
xfocus3:fix/icons-auto-piped-columns

Conversation

@xfocus3

@xfocus3 xfocus3 commented Jun 22, 2026 •

Copy link
Copy Markdown

Summary

  • Use the actual stdout terminal state for automatic output behavior instead of deriving it from the configured width
  • Keep COLUMNS and --width as layout inputs, so piped output can still use a grid while --icons=auto suppresses icons
  • Cover both width inputs with terminal and non-terminal output. A private helper keeps the public options API unchanged

The git2 dependency and API updates from earlier commits are now already on main. The product change is limited to src/options/view.rs; two existing version snapshots are also refreshed to match the current package version, 0.23.5.

Fixes #1842.

Validation

  • cargo fmt --check
  • cargo test --locked deduce_view_keeps_terminal_state_separate --lib
  • cargo test --locked --workspace
  • cargo test --locked --workspace --no-default-features
  • cargo clippy --locked --workspace --all-targets -- -D warnings
  • cargo build --locked
  • 21 command-line checks covering redirected output and a pseudo-terminal, COLUMNS, --width, automatic width, and --icons=auto/always/never; repeated with default features and without default features
  • Reproduced the piped-icon bug on unchanged main with both COLUMNS and --width, then verified the refreshed branch fixes both
  • Compared both corrected version snapshots byte-for-byte with the existing compiled binary; the full Nix trycmd suite subsequently passed in CI

The extra no-default-features Clippy check reports an existing needless_return in src/main.rs, also reproduced on unchanged main. That unrelated code is unchanged. MSRV, other-platform, and Nix-specific checks were not run locally; they passed in CI.

All 32 CI checks passed on a75998d: completed workflow run.

@xfocus3
xfocus3 force-pushed the fix/icons-auto-piped-columns branch from a3e83b2 to f057a47 Compare October 1, 2026 13:18
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.

bug: --icons=auto shows icons in non-TTY output when COLUMNS is set

1 participant