Commit graph

16883 commits

Author SHA1 Message Date
naoNao89
0047c7e66f fix(date): align pure-digit -d parsing with GNU semantics
Implement GNU 'Pure numbers in date strings' for time-of-day tokens:
- 1–2 digits => HH:00 today
- 3–4 digits => HHMM today
- Validate ranges; reject invalid times (e.g., 2400, 2360)

Also:
- Add tests for -d0, -d7, -d0700 under TZ=UTC0 and invalid numeric inputs
- Reference GNU manual section for pure numbers
2025-10-14 11:42:38 +07:00
Sylvestre Ledru
8d59e08097
Merge pull request #8897 from cakebaker/cargo_toml_remove_lints_clippy_section
Some checks failed
CICD / Style/cargo-deny (push) Has been cancelled
CICD / Style/deps (push) Has been cancelled
CICD / Documentation/warnings (push) Has been cancelled
CICD / MinRustV (push) Has been cancelled
CICD / Separate Builds (push) Has been cancelled
CICD / Dependencies (push) Has been cancelled
CICD / Code Coverage (push) Has been cancelled
GnuTests / Run GNU tests (native) (push) Has been cancelled
GnuTests / Run GNU tests (SELinux) (push) Has been cancelled
Benchmarks / Run benchmarks (CodSpeed) (push) Has been cancelled
Code Quality / Style/format (push) Has been cancelled
Code Quality / Style/lint (push) Has been cancelled
Code Quality / Style/spelling (push) Has been cancelled
Code Quality / Style/toml (push) Has been cancelled
Code Quality / Style/Python (push) Has been cancelled
Code Quality / Pre-commit hooks (push) Has been cancelled
Check uudoc Documentation Generation / Verify uudoc generates correct documentation (push) Has been cancelled
WSL2 / Test (push) Has been cancelled
CICD / Build/Makefile (push) Has been cancelled
CICD / Build/stable (push) Has been cancelled
CICD / Build/nightly (push) Has been cancelled
CICD / Binary sizes (push) Has been cancelled
CICD / Build (push) Has been cancelled
CICD / Tests/BusyBox test suite (push) Has been cancelled
CICD / Tests/Toybox test suite (push) Has been cancelled
CICD / Safe Traversal Security Check (push) Has been cancelled
CICD / Test all features separately (push) Has been cancelled
CICD / Build/SELinux (push) Has been cancelled
CICD / Build/SELinux-Stubs (Non-Linux) (push) Has been cancelled
GnuTests / Aggregate GNU test results (push) Has been cancelled
Cargo.toml: remove `lints.clippy` section
2025-10-13 11:16:41 +02:00
Daniel Hofstetter
0ae7de1aa3 Cargo.toml: remove lints.clippy section 2025-10-13 10:34:42 +02:00
Cả thế giới là Rust
16af7d4f9a
ls: Implement -f flag to disable sorting and enable -a (#8824)
* ls: implement -f flag with correct constant, color logic, and localization

Fix the -f flag implementation to properly enable all files display,
disable sorting, and handle color output correctly.

Changes:
- Correct UNSORTED_ALL constant from 'unsorted-all' to 'f'
- Fix color logic to honor explicit --color flag regardless of -f position
- Add French localization for ls-help-unsorted-all
- Add comprehensive integration tests for -f flag behavior

The explicit --color flag now always takes precedence over -f implicit
color disabling, matching expected CLI behavior.

* tests(ls): improve -f flag test assertions

Address maintainer feedback from PR #8824 review:

1. test_f_flag_disables_sorting: Compare -f output with -a (sorted) and -U (unsorted)
   to prove sorting is actually disabled, not just that files appear in output

2. test_f_overrides_big_a: Rename from test_f_overrides_a_and_big_a and fix assertions
   to check for .. presence (distinguishes -f from -A) instead of .hidden (shown in both)

3. test_f_overrides_sort_flags: Use size-based files and explicit output comparisons
   to verify last-flag-wins behavior with deterministic ordering

4. test_big_u_overrides_f_sort: Use size-based files and verify -U participates
   in last-flag-wins by checking actual output order

All tests now properly validate flag interactions instead of just checking file presence.

* refactor(ls): use match expression in extract_sort

Replace if/else chain with match expression for improved readability
and more idiomatic Rust code. Uses match guards for index comparisons.

Addresses maintainer feedback from PR #8824 review.

No functional changes - behavior remains identical.

* fix(ls): use snake_case for test variable names

Follow Rust naming conventions by converting variable names in -f flag
tests from mixed case (out_Af, out_fS, etc.) to snake_case (out_a_f,
out_f_s, etc.). This eliminates clippy warnings about non_snake_case
identifiers.

* tests: fix flaky ls tests that depend on filesystem directory order

The tests test_f_flag_disables_sorting, test_big_u_overrides_f_sort, and
test_f_overrides_sort_flags made incorrect assumptions that unsorted
directory order would always differ from sorted order. However,
fs::read_dir() returns entries in filesystem-dependent order which may
accidentally match sorted order on some filesystems.

Changes:
- Removed assertions comparing unsorted vs sorted outputs
- Added deterministic checks (e.g., verifying --sort after -f works)
- Added explicit order verification for size-sorted outputs
- Tests now verify flag precedence without relying on directory order

Fixes CI failures on Windows and SELinux platforms.

Quality checks passed:
- cargo fmt --check: ✓
- cargo clippy --test tests: ✓
- all 3 modified tests pass: ✓

* test: fix misleading test name for -U flag behavior

Renamed test_big_u_overrides_f_sort to test_big_u_participates_in_sort_flag_wins
to accurately reflect that it tests -U with -S interactions, not -f.
2025-10-13 09:42:25 +02:00
Daniel Hofstetter
2884718b77
Merge pull request #8895 from asder8215/feature/ringbuffer
uucore: ringbuffer pre-allocates memory based on size given
2025-10-13 09:18:38 +02:00
Mahdi Ali-Raihan
2ba4e39b82 uucore: ringbuffer pre-allocates memory based on size given 2025-10-12 18:46:41 -04:00
Sylvestre Ledru
36ca7bc444
Merge pull request #8894 from cakebaker/clippy_fix_manual_let_else
Some checks are pending
CICD / Separate Builds (push) Waiting to run
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Safe Traversal Security Check (push) Blocked by required conditions
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
CICD / Build/SELinux-Stubs (Non-Linux) (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Benchmarks / Run benchmarks (CodSpeed) (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Android / Test builds (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
Devcontainer / Verify devcontainer (push) Waiting to run
Check uudoc Documentation Generation / Verify uudoc generates correct documentation (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
clippy: re-enable `manual_let_else` lint
2025-10-12 23:09:04 +02:00
Ahmed hossam
d79c18a693
Merge pull request #8791 from dekuu5/stat/fix-symlink-behavior
Some checks are pending
CICD / MinRustV (push) Waiting to run
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
CICD / Build/SELinux-Stubs (Non-Linux) (push) Blocked by required conditions
CICD / Safe Traversal Security Check (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Benchmarks / Run benchmarks (CodSpeed) (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
Devcontainer / Verify devcontainer (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
stat: fix %N symlink to be single quote instead of double quote
2025-10-12 18:40:54 +02:00
Daniel Hofstetter
fa4837bbb1 clippy: re-enable manual_let_else lint 2025-10-12 17:13:10 +02:00
Sylvestre Ledru
f253efefaa
prepare version 0.3.0 (#8890)
Some checks failed
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
CICD / Build/SELinux-Stubs (Non-Linux) (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Benchmarks / Run benchmarks (CodSpeed) (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
Devcontainer / Verify devcontainer (push) Waiting to run
Check uudoc Documentation Generation / Verify uudoc generates correct documentation (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
CheckScripts / ShellScript/Check (push) Has been cancelled
CheckScripts / ShellScript/Format (push) Has been cancelled
* prepare version 0.3.0

* also update uu_stdbuf_libstdbuf

* also update fuzz
2025-10-12 13:31:16 +02:00
Sylvestre Ledru
15ba6aa5ef
Merge pull request #8891 from sylvestre/gh-bench
Some checks are pending
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
CICD / Build/SELinux-Stubs (Non-Linux) (push) Blocked by required conditions
CICD / Safe Traversal Security Check (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Benchmarks / Run benchmarks (CodSpeed) (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
Devcontainer / Verify devcontainer (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
github: compile & run benchmarks in parallel
2025-10-11 19:38:58 +02:00
Sylvestre Ledru
f19d7ec40b github: move benchmark into a single file 2025-10-11 19:19:13 +02:00
Sylvestre Ledru
6df73f033c github: compile & run benchmarks in parallel 2025-10-11 18:40:03 +02:00
Sylvestre Ledru
78667275e6
Merge pull request #8746 from jacob-greenfield/sort-fix-buffer-read
sort: fix newline handling across large and/or multiple files
2025-10-11 18:37:36 +02:00
Sylvestre Ledru
cc3a6a4b54
Merge pull request #8566 from sylvestre/fix-publishing
stdbuf: fix a publish issue
2025-10-11 17:53:31 +02:00
Sylvestre Ledru
2be17aa8eb
Merge pull request #8888 from cakebaker/docs_add_h_and_v_to_extensions
doc: add `-h` & `-V` to extensions
2025-10-11 17:47:51 +02:00
Christopher Ada Armstrong
7e12383fcf
cp: show relative path of source file with -vr (#8887)
* cp: show relative path of source file with -vr

Add test to cover fix.

* fix test expected output for windows
2025-10-11 17:30:19 +02:00
Daniel Hofstetter
7950cd5ac2 doc: add -h & -V to extensions 2025-10-11 16:53:12 +02:00
Jacob Greenfield
25e269cbf8 sort: generate test_start_buffer fixtures programmatically 2025-10-11 16:35:10 +02:00
Jacob Greenfield
3651d73a40 sort: add test for sorting a file which triggers a buffer resize 2025-10-11 16:35:10 +02:00
Jacob Greenfield
72b70a9387 sort: do not search previously-read characters for newlines 2025-10-11 16:35:10 +02:00
Jacob Greenfield
b6f4243fa7 sort: fix logic for inserting newline between files 2025-10-11 16:35:10 +02:00
Sylvestre Ledru
ffbcb4b381
Merge pull request #8886 from sylvestre/sort-bench
sort: add a bench for long line
2025-10-11 16:34:48 +02:00
Sylvestre Ledru
67d962a035
Merge pull request #8884 from cakebaker/bump_half_and_zerocopy
Bump `half` & `zerocopy`
2025-10-11 16:30:32 +02:00
Sylvestre Ledru
642f9612c1
Merge pull request #8885 from cakebaker/bump_nu_ansi_term
Bump `nu-ansi-term` from `0.50.1` to `0.50.3`
2025-10-11 16:30:22 +02:00
Sylvestre Ledru
20a05bdb0d sort: add a bench for long line 2025-10-11 15:46:52 +02:00
Daniel Hofstetter
94034d01a5 deny.toml: remove old windows-sys from skip list 2025-10-11 14:08:01 +02:00
Daniel Hofstetter
5beb00cb82 Bump nu-ansi-term from 0.50.1 to 0.50.3 2025-10-11 14:05:26 +02:00
Daniel Hofstetter
705dbeed70 Bump half & zerocopy
half from 2.6.0 to 2.7.0 and zerocopy from 0.8.25 to 0.8.27
2025-10-11 13:29:34 +02:00
Sylvestre Ledru
4c0d5ae4bc
Merge pull request #8881 from oech3/rm-exit1
Some checks are pending
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Separate Builds (push) Waiting to run
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Safe Traversal Security Check (push) Blocked by required conditions
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
CICD / Build/SELinux-Stubs (Non-Linux) (push) Blocked by required conditions
CICD / Run benchmarks (CodSpeed) (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
Devcontainer / Verify devcontainer (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
Drop redundant || exit 1
2025-10-11 11:12:21 +02:00
Sylvestre Ledru
95104f329f
Merge pull request #8809 from sylvestre/perf-doc
Document the bench process
2025-10-11 11:02:59 +02:00
E
c3e3847e62
Drop redundant || exit 1 2025-10-11 17:45:10 +09:00
Daniel Hofstetter
eb4ce0867f
Merge pull request #8878 from uutils/renovate/windows-sys-0.x-lockfile
chore(deps): update rust crate windows-sys to v0.61.2
2025-10-11 08:36:21 +02:00
Daniel Hofstetter
180b7eaa63
Merge pull request #8879 from uutils/renovate/regex-1.x-lockfile
chore(deps): update rust crate regex to v1.12.1
2025-10-11 08:30:36 +02:00
Daniel Hofstetter
40c823369e
Merge pull request #8877 from uutils/renovate/unicode-width-0.x-lockfile
chore(deps): update rust crate unicode-width to v0.2.2
2025-10-11 08:23:43 +02:00
renovate[bot]
0762aa99e7
chore(deps): update rust crate regex to v1.12.1 2025-10-11 05:33:55 +00:00
renovate[bot]
6ad9e5612c
chore(deps): update rust crate windows-sys to v0.61.2 2025-10-11 05:27:16 +00:00
renovate[bot]
5fe9a4cf0d
chore(deps): update rust crate unicode-width to v0.2.2 2025-10-11 05:27:08 +00:00
Daniel Hofstetter
327097598b
Merge pull request #8873 from uutils/renovate/memchr-2.x-lockfile
chore(deps): update rust crate memchr to v2.7.6
2025-10-11 07:26:39 +02:00
Daniel Hofstetter
26ebbb1eb4
Merge pull request #8874 from uutils/renovate/quote-1.x-lockfile
chore(deps): update rust crate quote to v1.0.41
2025-10-11 07:26:17 +02:00
Daniel Hofstetter
1cbb417e56
Merge pull request #8876 from uutils/renovate/thiserror-2.x-lockfile
chore(deps): update rust crate thiserror to v2.0.17
2025-10-11 07:25:42 +02:00
Daniel Hofstetter
334cd4e52f
Merge pull request #8875 from uutils/renovate/serde-monorepo
chore(deps): update rust crate serde to v1.0.228
2025-10-11 07:25:12 +02:00
renovate[bot]
43a2805d0e
chore(deps): update rust crate thiserror to v2.0.17 2025-10-11 00:47:29 +00:00
renovate[bot]
71f1846827
chore(deps): update rust crate serde to v1.0.228 2025-10-11 00:47:22 +00:00
renovate[bot]
ffb938fe9d
chore(deps): update rust crate quote to v1.0.41 2025-10-10 22:25:32 +00:00
renovate[bot]
f50da7f431
chore(deps): update rust crate memchr to v2.7.6 2025-10-10 22:25:26 +00:00
Sylvestre Ledru
daa74e726d
Merge pull request #8870 from sylvestre/more-bench
Some checks are pending
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
CICD / Build/SELinux-Stubs (Non-Linux) (push) Blocked by required conditions
CICD / Safe Traversal Security Check (push) Blocked by required conditions
CICD / Run benchmarks (CodSpeed) (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
Devcontainer / Verify devcontainer (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
More bench
2025-10-11 00:22:45 +02:00
Sylvestre Ledru
b891c850d6 refresh Cargo.lock 2025-10-10 23:23:22 +02:00
Sylvestre Ledru
097e620cf7 cut: add benchmarks 2025-10-10 23:23:07 +02:00
Sylvestre Ledru
7a988bf782 split: add benchmarks 2025-10-10 23:21:55 +02:00