- 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)
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.
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.
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.
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".