1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-02 05:57:46 +00:00
Commit graph

15884 commits

Author SHA1 Message Date
Teal Dulcet
4f32ebd266 Updated README and documentation to use SVG graphs. 2025-05-05 09:09:09 -07:00
Sylvestre Ledru
0d8362bc8d
Merge pull request #7887 from cakebaker/uptime_fix_typo_in_fn_name
uptime: fix typo (formated -> formatted)
2025-05-05 15:00:37 +02:00
Daniel Hofstetter
781a48b3a9 uptime: fix typo (formated -> formatted) 2025-05-05 14:47:57 +02:00
Alexander
7d5cfbc4b6
Merge pull request #7881 from alexs-sh/7736-control-flow-experiments
uucore/echo:handle ControlFlow result
2025-05-05 00:33:51 +02:00
cerdelen
13c0a813eb
Remove clap for echo (#7603)
* Parsing echo flags manually without clap as clap introduced various problematic interactions with hyphens

* fixed error where multiple flags would parse wrong

* Spelling & formatting fixes

* docu for EchoFlag struct

* more extensive comment/documentation

* revert POSIXLY_CORRECT check to only check if it is set

* Fixed problem of overwriting flags. Added test for same issue

* cargo fmt

* cspell

* Update src/uu/echo/src/echo.rs

Enabling POSIXLY_CORRECT flag if value is not UTF-8

Co-authored-by: Jan Verbeek <jan.verbeek@posteo.nl>

---------

Co-authored-by: Jan Verbeek <jan.verbeek@posteo.nl>
2025-05-04 20:13:52 +02:00
Eduardo Rittner Coelho
99ca58a7ca
uucore: add safe wrapper for getpgrp() (#7676)
* uucore: add safe wrapper for getpgrp()

* add getpgrp to the spell ignore

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2025-05-04 20:13:13 +02:00
hz2
6d29b7b3c1
Tail macos stdin ran from script fix (#7844)
* fixes #7763

- introduce macOS-specific config guard
- added test for testing tail stdin when redirected (`>`) from file and
  when through a pipe (`|`)

* created test to mock behavior in #7763, with comments

added drop line

* re-enabled test_stdin_redirect_dir_when_target_os_is_macos, and added a check to handle error message

* added location of current directory so test env can find script

* adjusting to try to have FreeBSD find the file in CI test

* putting in /env instead of assuming bash

* removed ignore macro

* added comments explaining the need for specific macOS cases, including reference to rust-lang issue: https://github.com/rust-lang/rust/issues/95239
2025-05-04 18:33:09 +02:00
Daniel Hofstetter
fd29eb5fc1
Cargo.toml: remove exact version req for selinux (#7883) 2025-05-04 17:54:48 +02:00
Teemu Pätsi
4ee53acad0
expr: Fix parsing negated character classes "[^a]" (#7884)
* expr: Fix regex escape logic

We have to track if the previous character was already escaped to determine
if the '\' character should be interpreted as an escape character.

* expr: Fix parsing caret (^) as character class negation token

* expr: Add tests for parsing carets in regex

* expr: Add missing semicolon

* expr: Simplify boolean assignment

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

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2025-05-04 17:35:18 +02:00
Daniel Hofstetter
69d5cf40b1
Merge pull request #7877 from yuankunzhang/main
split: fix a racing condition that causes issue #7869
2025-05-04 14:39:09 +02:00
Daniel Hofstetter
15b6f40cfd
cp: use authors.workspace in Cargo.toml (#7882) 2025-05-04 13:20:48 +02:00
Daniel Hofstetter
8c4d69b2f6
Merge pull request #7845 from sylvestre/selinux-error
set_selinux_security_context should return an Error, not String
2025-05-04 12:45:53 +02:00
yuankunzhang
d412f582cb split: fix a racing condition that causes issue #7869 2025-05-04 16:49:03 +08:00
Piepmatz
c8dbd185c0
Allow compiling uucore with wasm32-unknown-unknown (#7840)
and fix the build
2025-05-04 09:41:51 +02:00
Teemu Pätsi
d3a2db415c
id: The --real flag should only affect -u, -g, and -G (#7796)
* id: The `--real` flag should only affect `-u`, `-g`, and `-U`

* id: Test output with different UID and EUID

* id: Simplify testing different UID and EUID

* id: Compile preload file for test using cc instead of gcc

* id: Remove test for different UID and EUID

The test is incompatible with some CI/CD targets.

This reverts the following commits:
- 8efcbf9adae59b7074d29b2ac8ff8a4083df7d95
- 208fa8e7f88f29214ef99984bf47c6a9ebc2ed0d
- a498a2722d7ab56ce96e7cab4766343930ea85ac
2025-05-04 09:38:34 +02:00
Daniel Hofstetter
5909315d1c
date: move file header to top; merge imports (#7857) 2025-05-04 09:36:21 +02:00
Daniel Hofstetter
cd3c921d1e
cp: copy dir if source path ends with dot (#7874) 2025-05-04 09:31:34 +02:00
Sylvestre Ledru
c177362a51 set_selinux_security_context: also display the error from the crate
+ fix comments from review
2025-05-03 23:16:43 +02:00
Dorian Péron
f49e120877
Merge pull request #7846 from frendsick/fix/expr-regex-option-singleline
expr: Fix regex anchor matching behavior with `REGEX_OPTION_SINGLELINE`
2025-05-02 13:35:10 +02:00
Daniel Hofstetter
ed0492a046 uptime: fix "unused import" warnings with musl 2025-05-02 09:09:57 +02:00
Daniel Hofstetter
64d308db0e install: use map_err instead of if let Err 2025-05-02 09:09:47 +02:00
Daniel Hofstetter
74d04c26f0 install: remove three todos 2025-05-02 09:09:47 +02:00
Zhang Wen
68c91c17ba
install: implement the --no-target-directory option (#7867)
* implement --no-target-directory option

* add test for --no-target-directory
2025-05-02 07:24:16 +02:00
Sylvestre Ledru
595f56a9e7 set_selinux_security_context: match GNU's error 2025-05-01 14:10:13 +02:00
Sylvestre Ledru
8d94add393 set_selinux_security_context split the ContextRetrievalFailure error in two 2025-05-01 14:10:13 +02:00
Sylvestre Ledru
3bc267902c set_selinux_security_context should return an Error, not String 2025-05-01 14:10:13 +02:00
Daniel Hofstetter
8ec5fe189b
Merge pull request #7864 from uutils/renovate/sha2-0.x-lockfile
chore(deps): update rust crate sha2 to v0.10.9
2025-05-01 07:36:00 +02:00
renovate[bot]
db89b7a415
chore(deps): update rust crate sha2 to v0.10.9 2025-04-30 20:29:51 +00:00
Dorian Péron
279629f67e
Merge pull request #7855 from jtracey/printf-nonzero
printf: use non-zero indexes
2025-04-30 16:32:31 +02:00
Daniel Hofstetter
698cdf1427
Merge pull request #7862 from drinkcat/profiling-profile
Cargo.toml: Add profiling profile
2025-04-30 09:14:32 +02:00
Nicolas Boichat
b5824cd498 Cargo.toml: Add profiling profile
Also fix comment about release profile, debug info is not there.
2025-04-29 22:37:41 +08:00
Leo Emar-Kar
b14388ca41
ls: update chrono crate version and switch to new_lenient use (#7858)
* update chrono crate version and switch to new_lenient use

* bring back custom_tz_fmt and update test

* update chrono version in fuzz lock file

* replace boxing with parse_to_owned
2025-04-29 16:29:42 +02:00
Daniel Hofstetter
8084231eb9
Merge pull request #7859 from drinkcat/cicd-disable-windows-gnu
CICD: Disable windows-latest/x86_64-pc-windows-gnu for now
2025-04-29 16:18:44 +02:00
Daniel Hofstetter
faa2219262
Merge pull request #7854 from drinkcat/date-tests
date: add `%q` test, support `%#z` properly
2025-04-29 16:12:10 +02:00
Nicolas Boichat
deef8cbfd6 CICD: Disable windows-latest/x86_64-pc-windows-gnu for now
rust-orig current release is broken with GCC 15.1, and I don't
think it's possible to pin to an older github image, or an older
msys2 gcc...

Fixed upstream: https://github.com/rust-onig/rust-onig/issues/191
But waiting for new release: https://github.com/rust-onig/rust-onig/issues/193
2025-04-29 21:47:50 +08:00
Nicolas Boichat
19e08d5c11 test_date: Add test for quarter
This was fixed upstream in #7333, but it's a good idea to have a
test here as well, especially as we're considering switching
datetime library.
2025-04-29 21:35:00 +08:00
Nicolas Boichat
25e4410c3b date: Properly support %#z, instead of rejecting the format
It's easy to just replace %#z with %z as the capitalization makes
no sense anyway.
2025-04-29 21:35:00 +08:00
Daniel Hofstetter
053e6b4d08
Merge pull request #7856 from uutils/renovate/clap_complete-4.x-lockfile
chore(deps): update rust crate clap_complete to v4.5.48
2025-04-29 07:10:33 +02:00
renovate[bot]
5c3a52b0eb
chore(deps): update rust crate clap_complete to v4.5.48 2025-04-28 22:54:13 +00:00
Justin Tracey
27487be267
printf: use non-zero indexes 2025-04-28 14:06:12 -04:00
Dan Hipschman
e92e419a93 cp: refuse to copy symlink over itself 2025-04-28 09:56:43 +02:00
bitspill
d957e64999
Merge pull request #7492 from bitspill/rm
rm: skip prompt when stdin is not interactive; Fix #7326
2025-04-27 23:54:16 +02:00
Teemu Pätsi
07501be4ae
expr: Escape anchor characters within pattern (#7842)
* expr: Escape anchor characters within the core pattern

The anchor characters `^` and `$` are not considered special characters by `expr`
unless they are used as expected on the start or end of the pattern.
2025-04-27 23:52:35 +02:00
Sylvestre Ledru
ddf48facbe
Merge pull request #7848 from hz2/uutests-repo-link-fix
fixed link to repo on uutests docs
2025-04-27 10:14:59 +02:00
jsondevers
2e1c91f682 fixed link to repo on uutests docs 2025-04-26 18:36:21 -07:00
Daniel Hofstetter
ed3da5fd65
Merge pull request #7847 from BenWiederhake/dev-shred-deterministic-random-passes-extension
shred: document simplified (better?) number of random passes
2025-04-26 19:16:31 +02:00
Ben Wiederhake
abb2acc3a2 shred: document simplified (better?) number of random passes 2025-04-26 18:37:35 +02:00
Teemu Pätsi
c6e2f9fd9a
expr: Enable ignored test_anchor test 2025-04-26 18:28:21 +03:00
Teemu Pätsi
8cd51227c6
expr: Fix regex anchor matching behavior with REGEX_OPTION_SINGLELINE
The previously used `REGEX_OPTION_NONE` allowed anchors (^) and ($) to match across newlines.

New anchor behaviors:
- `^` matches the start of the entire string (`\A`)
- `$` matches the end of the entire string (`\Z`)
2025-04-26 18:22:22 +03:00
Sylvestre Ledru
606c0c1f57
Merge pull request #7837 from sargas/add-indexing-to-printf
printf: Add indexing to format strings
2025-04-25 23:58:01 +02:00