1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 12:37:49 +00:00
Commit graph

15884 commits

Author SHA1 Message Date
Sylvestre Ledru
8f5f22eb86 l10n: port basename to translation + add french 2025-06-06 09:13:25 +02:00
Daniel Hofstetter
1d11f85dd2
Merge pull request #8066 from sylvestre/bidi
l10n: Disable Unicode directional isolate characters (U+2068, U+2069)
2025-06-06 09:08:23 +02:00
Sylvestre Ledru
4bd3b70774
Merge pull request #8070 from cakebaker/rm_rename_constants
rm: rename two consts for better readability
2025-06-05 18:45:34 +02:00
Daniel Hofstetter
51c5c9c59a rm: rename two consts for better readability
OPT_PROMPT => OPT_PROMPT_ALWAYS, OPT_PROMPT_MORE => OPT_PROMPT_ONCE
2025-06-05 17:05:48 +02:00
Daniel Hofstetter
ab40fcff7e uptime: use "0 users" instead of "0 user" 2025-06-05 15:32:45 +02:00
Will Shuttleworth
61bd11a551
stty: set control characters (#7931)
* reworked arg processing. control character mappings are correctly grouped now, ie 'stty erase ^H'

* stty: setting control chars to undefined (disabling them) is implemented

* setting control chars

* stty: can now set control chars. need to improve checks on valid mappings

* stty: matches GNU in what control character mappings are allowed

* stty: run rustfmt and remove extra comments

* stty: setting control char code review fixes

* stty: fix rustfmt errors

* stty: more small edits after review

* stty: refactor set control char changes for better testing

* stty: fix ci error

* stty: fix issues from code review
2025-06-05 11:38:51 +02:00
Daniel Hofstetter
ccc6233fba
Merge pull request #8054 from sylvestre/locale3
l10n: convert the md files to fluent
2025-06-05 09:39:42 +02:00
Sylvestre Ledru
dd57bcfd3d
Merge pull request #8067 from Ecordonnier/eco/libstdbuf
stdbuf: avoid double "lib" prefix
2025-06-05 08:03:58 +02:00
Etienne Cordonnier
8c1cc5b992 stdbuf: avoid double "lib" prefix
libstdbuf is currently compiled as e.g. liblibstdbuf.so, which is confusing.
Compile the library as libstdbuf.so instead.

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
2025-06-05 00:00:45 +02:00
Sylvestre Ledru
5b2078b02d l10n: Disable Unicode directional isolate characters (U+2068, U+2069) 2025-06-04 22:32:59 +02:00
Sylvestre Ledru
4b776ba995 l10n: also manage individual binary usages 2025-06-04 19:24:20 +02:00
Sylvestre Ledru
578499fbad coreutils.rs: spell ignore 2025-06-04 19:24:03 +02:00
Sylvestre Ledru
005f0b7737 cargo fmt 2025-06-04 19:24:03 +02:00
Sylvestre Ledru
154250ac24 refresh cargo.lock from fuzzing 2025-06-04 19:24:03 +02:00
Sylvestre Ledru
c3f2247eca l10n: remove help_about 2025-06-04 19:24:03 +02:00
Sylvestre Ledru
c437ac830e l10n: the manpage creation should use the locale files 2025-06-04 19:24:03 +02:00
Sylvestre Ledru
d9f0868a45 l10n: Adjust a test, I don't think we need to full path with 'usage' 2025-06-04 19:24:03 +02:00
Sylvestre Ledru
a7f941577f bin/coreutils: add unit tests 2025-06-04 19:24:03 +02:00
Sylvestre Ledru
00982c9374 l10n: Move the prefix removal into a function 2025-06-04 19:24:03 +02:00
Sylvestre Ledru
b904f36636 l10n: manages aliases of commands 2025-06-04 19:24:03 +02:00
Sylvestre Ledru
a36d5455ab l10n: improve the display when the ftl is invalid 2025-06-04 19:24:03 +02:00
Sylvestre Ledru
7102e1a4b5 l10n: remove the old md files 2025-06-04 19:24:03 +02:00
Sylvestre Ledru
16afa021ce l10n: add a comment to detail the need of having the capability to disable translations 2025-06-04 19:24:03 +02:00
Sylvestre Ledru
5ab807a561 l10n: disable the arch locale init 2025-06-04 19:24:03 +02:00
Sylvestre Ledru
1a80fc59a3 l10n: init the locale engine for each program (next: put it behing a feature) 2025-06-04 19:24:03 +02:00
Sylvestre Ledru
94c1fad206 l10n: adjust the code to use the fluent files instead of the PROG.md docs 2025-06-04 19:23:57 +02:00
Sylvestre Ledru
28c16dd6d1 l10n: convert the PROG.md command to fluent 2025-06-04 19:19:02 +02:00
Sylvestre Ledru
d8bb7875cf l10n: adjust the code to use help_about & help_usage 2025-06-04 19:19:02 +02:00
Sylvestre Ledru
42cfb3d8be locale: show the error in case of issue 2025-06-04 19:18:59 +02:00
ALBIN BABU VARGHESE
a7a493a604
mv: moving dangling symlinks into directories (#8064)
* Fix linting and style issues

* Change condition to not fail for dangling symlinks

The function `move_files_into_dir` had a condition that failed when a
dangling symlink was moved into a folder, which resulted in a file
or directory doesn't exist error

* Added a test case
2025-06-04 17:25:53 +02:00
Nicolas Boichat
8c98f433bf test_sort: Add one more test checking arbitrary precision handling 2025-06-04 09:54:44 +02:00
Nicolas Boichat
ee1a6d2e66 test_sort: Add more sort use cases
test_g_float comes from GNU test, the other one is manually crafted.
2025-06-04 09:33:17 +02:00
Nicolas Boichat
a2f9543a14 docs/src/extensions: Sort uses arbitrary precision decimal numbers 2025-06-04 09:05:49 +02:00
Daniel Hofstetter
c332d96203
Merge pull request #8055 from sylvestre/gnu-release
GNU CI: also build selinux with --release-build
2025-06-04 07:22:39 +02:00
Daniel Hofstetter
1bcd1265fe
Merge pull request #8057 from uutils/sylvestre-patch-1
uucore_procs: use authors.workspace
2025-06-04 07:14:32 +02:00
Yuri Astrakhan
f46e096d35 Add common pre-commit hooks
Pre-commits are usually used to minimize busy work by the contributors, e.g., by fixing extra spacing, formatting, etc. This PR adds various basic text file checks to the repo. I also made yaml spacing a bit cleaner.

I was a bit surprised it is used for `cargo clippy` because you wouldn't want clippy's auto-fixes to be auto-applied by CI, so usually GitHub workflow simply checks runs it regularly. This is outside of the scope for this PR, but perhaps it should be removed here?
2025-06-03 18:59:36 -04:00
Sylvestre Ledru
4050f68e6e
uucore_procs: use authors.workspace 2025-06-03 22:26:58 +02:00
Sylvestre Ledru
e39037c699 GNU CI: also build selinux with --release-build 2025-06-03 21:41:01 +02:00
Nicolas Boichat
7457a76f40 uucore: num_parser: Optimize bigdecimal create when exponent is 0
Makes creating float number without an exponent part quite a bit
faster. Saves about 9% speed in sort -g.
2025-06-03 19:54:21 +02:00
Nicolas Boichat
3b18316337 uucore: num_parser: Optimize parse_digits_count
parse_digits_count is a significant hotspot in parsing code.
In particular, any add/mul operation on BigUint is fairly slow,
so it's better to accumulate digits in a u64, then add them
to the resulting BigUint.

Saves about 15-20% performance in `sort -g`.
2025-06-03 19:54:21 +02:00
Nicolas Boichat
edc1e5def6 uucore: num_parser: Improve scale conversion to i64
It turns out repeatedly calling i64::MAX.into() and i64::MIN.into()
is actually very expensive. Just do the conversion first, and if
it fails, we know why.

Sadly there is still a conversion happening under the hood in
`-exponent + scale`, but that'd need to be fixed in Bigint.

Improves sort -g performance by ~5%.
2025-06-03 19:54:21 +02:00
Nicolas Boichat
8426c1480c sort: Make use of ExtendedBigDecimal in -g sorting
This provides better precision than f64, which we need.

Fixed #8031.
2025-06-03 19:54:21 +02:00
Sylvestre Ledru
ef9cb277fc
Merge pull request #8052 from cakebaker/uptime_move_imports_into_test_function
uptime: move imports into test function
2025-06-03 17:26:27 +02:00
Daniel Hofstetter
3904d5b614 uptime: move imports into test function
to simplify the cfg handling
2025-06-03 16:12:52 +02:00
Daniel Hofstetter
040532a027
Merge pull request #8051 from uutils/renovate/bytecount-0.x-lockfile
chore(deps): update rust crate bytecount to v0.6.9
2025-06-03 10:49:41 +02:00
Vikram Kangotra
bfbdd5275d
cp: migrate from quick-error to thiserror (#7989)
* cp: migrate from quick-error to thiserror

fixes: #7916

* Remove quick-error

Now that we have migrated to thiserror, we can remove quick-error

* cp: fix test failures

* cp: fix fmt error
2025-06-03 10:12:36 +02:00
renovate[bot]
0c9f2f11f4
chore(deps): update rust crate bytecount to v0.6.9 2025-06-03 08:04:43 +00:00
Sylvestre Ledru
28612fe1f1
Merge pull request #8050 from drinkcat/local-lang-clippy
uucore: locale: Use if let instead of match
2025-06-03 10:02:31 +02:00
Nicolas Boichat
c939b6096b uucore: locale: Use if let instead of match
Recent cargo clippy prefers to use if let for single pattern.

For some reason it only triggers on one of the LANG restore case though,
but we can just fix them all.
2025-06-03 09:35:47 +02:00
Dylan Ullrich
862565cd1a
Merge pull request #8047 from eldyl/feat/add_wezterm_to_terms
Feat/add wezterm to terms
2025-06-03 07:54:05 +02:00