18 Commits
Author SHA1 Message Date
Christina Sørensen b0fdb0d6e0 fix(loc): satisfy newer clippy and stabilise powertest.yaml
- remove redundant #[must_use] on Report::languages (double_must_use)
- use is_multiple_of in the share-bar renderer (manual_is_multiple_of)
- drop a pre-existing needless double-borrow in a view.rs test
- reformat the powertest.yaml comment into yamlfmt's fixed-point form
  (verified stable across repeated yamlfmt runs)
2026-07-09 10:36:34 +02:00
Christina Sørensen 4a7bfa58fc feat: add lines-of-code counting and summary
Introduces a built-in lines-of-code (LOC) counter to `eza` that supports
over 50 programming languages.

- Adds the `--code` flag to provide a project-wide summary of code,
  comments, and blanks by language.
- Adds the `--loc` flag to include lines-of-code and language columns in
  the long view.
- Provides support for multiple display modes (`lines`, `percent`,
  `both`) for both flags.
- Includes comment-aware counting, respecting language-specific comment
  syntax while ignoring string literals.
- Updates completions for fish, nushell, powershell, and zsh to include
  the new flags.
2026-07-09 10:36:34 +02:00
Henry Chu 72e323171c feat: Implement --hyperlink=auto 2026-03-30 16:16:59 +02:00
ariasuni 1e82e86304 fix(itest): update integration tests 2026-03-30 14:59:31 +02:00
fc0ba14922 feat(cli): use Clap instead of manual cli args parsing
Co-authored-by: PThorpe92 <[email protected]>
Co-authored-by: MartinFillon <[email protected]>
Co-authored-by: Terts Diepraam <[email protected]>
2026-01-29 16:06:10 +01:00
Christina Sørensen 7f081337bd feat!: define -d/--treat-dirs-as-files behavior, tests
BREAKING CHANGE: The behavior of the `-d` flag has been refined to be more
consistent with `ls`. Its long flag has been changed to `--treat-dirs-as-files`
for clarity, while `--list-dirs` is retained as a backward-compatible alias to be
removed in a future release.

Based on the preious commit by cysabi, this commit addresses
inconsistencies and ambiguities related to the `-d` flag and its
long-flag variants.

The behavior of `-d` has been aligned more closely with `ls`, where it
lists directories as regular files rather than listing contents of
directories. The new, more descriptive long flag `--treat-dirs-as-files`
clarifies this intent.

A backward-compatible alias `--list-dirs` is provided to ease the
transition for existing users, with the intention of deprecating it
later.

Since cysabi's fix included addresing `eza -TL 1` not correctly
rendering the tree depth, this also includes tests to ensure that
behavior doesn't regress in the future... again.

Specifically, `powertest` integration tests have been added for `eza
-TL<value>` for levels 0 through 5, ensuring the correct tree structure
output at specified depths. This also includes tests for the updated
`-d`/`--treat-dirs-as-files` behavior.

It is also noted that for users who primarily intend to list only directories,
the `--only-dirs` (`-D`) option might be a more suitable and explicit alternative
to `--treat-dirs-as-files`. This has been added to the man page as well
as a more verbose description of the flag.

Completions have also been fixed.
2025-06-30 19:34:33 +02:00
Erwin van Eijk e978b3efe9 feat: show directories last
For example, it will be quite useful to use this feature alongside --tree
as then when printing a deeply nested directory structure, all the files
within each directory will be listed first and then the remaining deeply
nested directory subtree within it will be printed, giving the users a
far better understanding of which files are within each folder.
2024-10-03 07:43:40 +02:00
Christina Sørensen 308bd1aeb0 fix: pre-commit-hook taplo bug
Signed-off-by: Christina Sørensen <[email protected]>
2024-09-26 09:24:39 +02:00
Christina Sørensen cfd745d6f0 refactor: relicense to EUPL-1.2
Signed-off-by: Christina Sørensen <[email protected]>
2024-09-26 09:24:39 +02:00
Christina Sørensen cb15b12984 style: switch to nixfmt rfc style, format tree
Signed-off-by: Christina Sørensen <[email protected]>
2024-09-26 09:24:39 +02:00
Tamino Bauknecht 33a85e41c8 test: Add integration tests and powertests for --absolute flag
Note that the absolute paths in tests/cmd/ need to have their root at
[CWD] and not /build/source/ for "cargo test" work.
The command "just idump" will overwrite the files in tests/cmd/ leading
to a failing "cargo test".
2024-03-04 07:12:23 +01:00
Guillermo Perez 367ff558a6 feat(flags)!: add --classify=always,auto,never
BREAKING CHANGE:
--classify now accepts WHEN (always,auto,never). When none specified defaults to "auto" instead of previous "always" behavior
2024-01-28 09:37:19 +01:00
Christina Sørensen 6997414f50 test: long view options
Signed-off-by: Christina Sørensen <[email protected]>
2023-11-16 14:41:07 +01:00
Christina Sørensen 7616ad5903 test: filtering and sorting
Signed-off-by: Christina Sørensen <[email protected]>
2023-11-16 14:41:07 +01:00
Christina Sørensen 9c55a616c2 test: display and meta options
Signed-off-by: Christina Sørensen <[email protected]>
2023-11-16 14:41:07 +01:00
Christina Sørensen 6ea8ff4715 test(powertests): add hashed versions of powertests
Signed-off-by: Christina Sørensen <[email protected]>
2023-11-16 10:06:51 +01:00
Christina Sørensen 4f949fc9bb test(powertest): powertests using generated testdirs
Signed-off-by: Christina Sørensen <[email protected]>
2023-11-13 17:41:03 +01:00
Christina Sørensen d6d02d14e8 feat(powertest): add powertest
Signed-off-by: Christina Sørensen <[email protected]>
2023-11-13 17:41:03 +01:00