Commit Graph
4354 Commits
Author SHA1 Message Date
Sylvestre LedruandGitHub 4a69cf0c5e tr: drop '[:...:]' wrapper from invalid character class error (#12122) 2026-05-04 09:54:56 +02:00
Sylvestre LedruandGitHub 163103355a head: strip os error suffix from stdout write error message (#12121) 2026-05-04 09:38:54 +02:00
Sylvestre LedruandGitHub b2c4e0c125 factor: emit GNU 9.11 'is not a valid positive integer' for stdin input (#12137)
* factor: emit GNU's 'X is not a valid positive integer' wording

GNU's factor.c routes both stdin and command-line input through the same
print_factors() and reports invalid input as
  factor: 'X' is not a valid positive integer
Match that wording exactly so the new GNU 9.11 'nul4' test passes and
the 'cont' test no longer needs the warning/invalid-digit hunk in
tests_factor_factor.pl.patch.

* Add 'cmdline' to spell-checker ignore list
2026-05-04 09:31:59 +02:00
Guillem L. JaraandDaniel Hofstetter f774940451 fix(ls): place dot dirs on top in version sorting
Also fixes the fact that version sorting had incorrect edge cases due to wrong name passing.
2026-05-01 15:09:49 +02:00
pocopepeandDaniel Hofstetter 375fc3cd48 numfmt: reject %f values too large to format exactly 2026-05-01 09:40:58 +02:00
oech3andDorian Péron 4620c2f3b6 yes: use tee syscall as fast-path 2026-04-30 14:45:28 +02:00
b3d8706a2c sort: fix inconsistent sort ordering under i18n-collator with equal sorting keys (#12013)
* sort: Fix inconsistent sort orderg under i18n-collator with equal sorting keys.

* Test cases for fix #11980

* Simplyfing fix for #11980

* Fix clippy lint and rename test files.

* Remove old test files

* Update tests/by-util/test_sort.rs

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* Update tests/by-util/test_sort.rs

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* Removing redundant test and swapping default order for sort to match sort's ordering.

* Comment for clarification.

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2026-04-30 10:33:48 +02:00
oech3andDaniel Hofstetter dd72eca93c tty: Build for Windows 2026-04-29 11:03:10 +02:00
oech3andDaniel Hofstetter 5aade310be test_test.rs: remove unsafe 2026-04-28 14:24:49 +02:00
oech3andGitHub ec72d08bf1 test_nohup.rs: remove unsafe (#12052) 2026-04-28 10:52:33 +02:00
xtqqczzeandDaniel Hofstetter c2acff22ee clippy: fix items_after_statements lint
https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements
2026-04-28 09:37:21 +02:00
oech3andDaniel Hofstetter c7e2957a0d test_tail.rs: remove unsafe 2026-04-28 08:35:40 +02:00
oech3andGitHub 3f6a73da62 test_ls.rs: remove unsafe (#12044) 2026-04-28 00:10:49 +02:00
oech3andGitHub 670fb243fd test_nice.rs: remove unsafe (#12040) 2026-04-27 22:08:39 +02:00
hayato0909andDaniel Hofstetter 7d3a3475b2 numfmt: fix rounding for small scaled values 2026-04-27 17:29:29 +02:00
Lorenzo RossiandGitHub a8ca919dc4 du: propagate errors from --exclude-from instead of panicking (#11996)
* du: propagate errors from --exclude-from instead of panicking

* du: update test_du with --exclude-from failures

* du: fix expected stderr in exclude-from read-error test
2026-04-27 16:14:26 +02:00
Devel08GitHubpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
5fa0aba94d date: don't ignore width prefix in %N format specifier (#12010)
* do not ignore %N if specified width is smaller than default width

* add test for issue #12001

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* cargo clippy

* truncate instead of popping in a loop

* Update format_modifiers.rs

* skip truncation if width is 0

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-04-27 14:59:09 +02:00
oech3andDaniel Hofstetter e8c6c60190 paste: remove unsafe from test code 2026-04-27 11:34:53 +02:00
oech3andDaniel Hofstetter 0d67e58523 cat: remove unsafe from test code 2026-04-27 11:31:19 +02:00
oech3andDaniel Hofstetter 0ca9039fd7 tee: remove unsafe from test code 2026-04-27 09:16:56 +02:00
6b16cc9688 rm: fix path parsing for dot/dotdot protection (#11005)
Fixes #9749: rm -rf ./ and variants silently delete current directory
contents. The path_is_current_or_parent_directory() function did not
match paths like "./" after clean_trailing_slashes() collapsed them.

Rewrite the function to strip trailing separators, extract the last
component, and check if it is "." or "..".

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
Co-authored-by: naoNao89 <naoNao89@users.noreply.github.com>
2026-04-26 11:12:21 +02:00
Devel08andGitHub c5bdff1816 numfmt: treat multibyte chars as a single character (#11992)
* treat multibyte chars as a single character

* add test for issue 11937
2026-04-25 18:51:57 +02:00
pocopepeandDaniel Hofstetter e348e13e77 numfmt: cap IEC precision at 3 decimals 2026-04-25 16:41:30 +02:00
Devel08andGitHub d836730024 numfmt: respect --invalid mode when rejecting scientific notation (#11945)
* fix #11935

* code style and error message

* cargo fmt

* add test for issue 11935

* Update test_numfmt.rs

* check for the expected output in test
2026-04-23 17:29:40 +02:00
oech3andDaniel Hofstetter 2f49d8eb02 ls: use cfg unix 2026-04-23 10:15:38 +02:00