Skip to content

feat: port --since filter, -S/--blocks flag, icons terminal isolation, and newest sort aliases (eza#1687, #1667, #1849, #1853) - #18

Merged
fxrdhan merged 4 commits into
mainfrom
feat/upstream-ports-pr18
Aug 21, 2026
Merged

fxrdhan merged 4 commits into
mainfrom
feat/upstream-ports-pr18

Conversation

@fxrdhan

@fxrdhan fxrdhan commented Aug 21, 2026 •

Copy link
Copy Markdown
Owner
Description

This PR ports and hardens four high-priority upstream features and bugfixes from eza-community/eza into lsr. Each item is committed as its own granular, atomic commit:

  1. Commit 1 (452680ff): feat(filter): implement --since time-based file filtering flag (ported from eza-community/eza#1687)

    • Implements the --since <DURATION> CLI flag to filter and display only files created or modified within the specified duration window (e.g. 10m, 1h, 2d, 1w).
    • Uses humantime for robust human-friendly duration parsing and checks both modified and created timestamps against current time cutoff.
    • Updates documentation (README.md, man/eza.1.md, man/lsr.1.md) and shell completions (bash, zsh, fish, nushell, powershell).
    • Includes dedicated unit and integration tests in src/options/filter.rs, tests/since_flag_tests.rs, and tests/adversarial_since_m1_challenger_tests.rs.
  2. Commit 2 (5d1b6c12): feat(view): add -S / --blocks flag for filesystem block counts (ported from eza-community/eza#1667)

    • Adds the -S / --blocks CLI flag (as an alias to --blocksize) to toggle displaying 512-byte allocated filesystem block counts in long table view (-l).
    • Ensures strict mode compliance when -S / --blocks is passed without --long and full parity across short and long flag invocations.
    • Updates documentation, manual pages, and shell completions.
    • Includes dedicated integration tests in tests/blocks_flag_tests.rs, tests/adversarial_blocks_m2_challenger_tests.rs, and tests/adversarial_blocks_m2_challenger2_full_tests.rs.
  3. Commit 3 (0d918599): fix(view): decouple icons=auto terminal detection from COLUMNS (ported from eza-community/eza#1849 and eza-community/eza#1843)

    • Decouples --icons=auto terminal detection from terminal-width deduction, querying vars.stdout_is_terminal() directly.
    • Prevents the presence of the COLUMNS environment variable from erroneously enabling Nerd Font icons in non-interactive pipes or file redirects.
    • Includes unit tests in src/options/view.rs and integration tests in tests/icons_auto_terminal_tests.rs.
  4. Commit 4 (eb438909): fix(sort): align sort aliases so newest/new sorts newest-first (ported from eza-community/eza#1853)

    • Aligns sort aliases so that --sort=newest and --sort=new map to SortField::ModifiedAge (sorting newest files at the top, matching --sort=age), while old and oldest map to SortField::ModifiedDate (sorting oldest files at the top).
    • Updates documentation (README.md, man/eza.1.md, man/lsr.1.md) and shell completions (bash, zsh, fish, pwsh).
    • Includes unit tests in src/options/filter.rs and dedicated integration tests in tests/sort_aliases_tests.rs.
How Has This Been Tested?
  • Test Suite: cargo test --all-targets (all unit and integration tests passing across all test suites, including tests/since_flag_tests.rs, tests/adversarial_since_m1_challenger_tests.rs, tests/blocks_flag_tests.rs, tests/icons_auto_terminal_tests.rs, and tests/sort_aliases_tests.rs).
  • Linter: cargo clippy --all-targets --all-features -- -D warnings (0 warnings).
  • Formatting: cargo fmt --all -- --check (clean).
  • Compliance: reuse lint (100% compliant with REUSE v3.3 specification across 561 files).

@fxrdhan
fxrdhan force-pushed the feat/upstream-ports-pr18 branch from 696f0e1 to eb43890 Compare August 21, 2026 05:26
@fxrdhan
fxrdhan merged commit 0d9a972 into main Aug 21, 2026
12 checks passed
@fxrdhan
fxrdhan deleted the feat/upstream-ports-pr18 branch August 23, 2026 02:36
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.

1 participant