* chown: support '.' as 'user.group' separator (like ':')
It also manages the case:
user.name:group (valid too)
Should fix:
gnu/tests/chown/separator.sh
* Fixed some documentation of display_item_long that was missed in #2623
* Implemented coloring of `ls -l` symlink targets( after the arrow `->`).
* Documented display_file_name to some extent.
* Ran rustfmt as part of mitigating CI chain errors.
* Removed unused variables and code in test_ls_long_format as per #2623
specifically, as per
https://github.com/uutils/coreutils/pull/2623#pullrequestreview-742386707
* Added a thorough test for `ls -laR --color` symlink coloring implemented in this branch.
* renamed test files and dirs to shorter names and ran rustfmt.
* Changed the order with which files are expected to match the change in their name.
* Bettered some comments.
* Removed needless borrow. Fixed that one clippy warning.
* Moved the cfg not windows up to the function level
because this function is meant to only run in non-windows OS (with
groups and unames).
Fixes the unused variable warning in CI.
- prevent duplicate errors from both us and `walkdir` by instructing `walkdir'
to skip directories we failed to read metadata for.
- don't directly display `walkdir`'s errors, but format them ourselves to
match gnu's format
Fix a mix-up between ownership and mode. The latter (mode / file permissions)
can also be set on windows (which however only affects the read-only flag),
while there doesn't seem to be a straight-forward way to change file ownership
on windows.
Copy the acl as well when copying the mode. This is a non-default feature and can be
enabled with --features feat_acl, because it doesn't seem to work on CI.
It is only available for unix so far.
Copy the SELinux context if possible.
Makes the -o auto option construct a format at initialization, rather
than try to handle it as a special case when printing lines. Fixes bugs
when combined with -e, especially when combined with -a.
* Used .as_path() and .as_str() when required:
when the argument required is a Path and not a PathBuf,
or an str and not a Path, respectively.
* Changed display_items to take Vec<PathData>, which is passed, instead of [PathData]
* Added a pad_right function.
* Implemented column-formating to mimic the behavior of GNU coreutils's ls
Added returns in display_dir_entry_size that keep track of uname and
group lengths.
Renamed variables to make more sense.
Changed display_item_long to take all the lengths it needs to render
correctly.
Implemented owner, group, and author padding right to mimic GNU ls.
* Added a todo for future quality-of-life cache addition.
* Documented display_item_long, as a first step in documenting all functions.
* Revert "Used .as_path() and .as_str() when required:"
This reverts commit b88db6a817.
* Revert "Changed display_items to take Vec<PathData>, which is passed, instead of [PathData]"
This reverts commit 0c690dda8d.
* Ran cargo fmt to get rid of Style/format `fmt` testing error.
* Added a test for `ls -l` and `ls -lan` line formats.
* Changed uname -> username for cspell. Removed extra blank line for rustfmt.
Fix a bug in `seq` where the number of characters needed to print the
number was computed incorrectly in some cases. This commit changes the
computation of the width to be after parsing the number instead of
before, in order to accommodate inputs like `1e3`, which requires four
digits when printing the number, not three.
- Implement all of GNU's fiddly little details
- Don't assume Linux for error codes
- Accept badly-encoded filenames
- Report errors after the fact instead of checking ahead of time
- General cleanup
rmdir now passes GNU's tests.
Errors are now always shown with the corresponding filename.
Errors are no longer converted into warnings. Previously `wc < .`
would cause a loop.
Checking whether something is a directory is no longer done in
advance. This removes race conditions and the edge case where stdin is
a directory.
The custom error type is removed because io::Error is now enough.
Report errors properly instead of panicking.
Replace zero_copy by a simpler specialized private module.
Do not assume splices move all data at once.
Use the modern uutils machinery.
Remove the "latency" feature. The time it takes to prepare the buffer
is drowned out by the startup time anyway.
yes: Add tests
yes: Fix long input test on Windows