Sylvestre Ledru
0b04bcaf9a
uucore: create a new function to manage the warning/error display
2024-05-14 23:21:53 +02:00
Sylvestre Ledru
81500ae3b8
cksum: implement check & strict
2024-05-12 21:20:58 +02:00
Sylvestre Ledru
5f0b48e649
cksum: use the qualified import to make its provenance clear
2024-05-12 21:20:58 +02:00
Sylvestre Ledru
7e33650c8c
cksum: move the length mgmt into a function + add tests
2024-05-12 21:20:58 +02:00
Anirban Halder
1a5639b7d2
Fix ls: panicking on dangling symlink with --color=auto -l ( #6346 )
...
* Fixed unwrap being called on dereferenced dangling symlink
* Added test
* Switched to regex matching in test
* Remove unnecessary mkdir call
* Modified documentation of the test and added assertion of the colors
* Fixed a typo
2024-05-11 21:07:44 +02:00
Anirban Halder
88d9d46abc
Added test for dangling symlink in target directory
2024-05-08 23:50:33 +02:00
Anirban Halder
1f81912b3c
Added assertion of stderr strings for macos and windows and fixed lints
2024-05-08 23:50:33 +02:00
Anirban Halder
f7e55b1322
Added overwrite detection for existing symlinks
2024-05-08 23:50:33 +02:00
Daniel Hofstetter
8078fca99b
stdbuf: rename dragonflybsd to dragonfly
2024-05-08 20:19:42 +02:00
Daniel Hofstetter
50988f5d07
uucore: remove support for Bitrig
2024-05-08 15:43:26 +02:00
Sylvestre Ledru
ee2772925a
cksum: --tag & --untagged - the order of usage matters. manage it
2024-05-07 20:24:25 +02:00
Sylvestre Ledru
9e080a3684
cksum: handle a corner case
2024-05-07 20:24:25 +02:00
Sylvestre Ledru
234f2f9508
cksum: handle an error like GNU
2024-05-07 20:24:25 +02:00
Sylvestre Ledru
10d8fd6f98
cksum: add binary and prepare the rest
2024-05-07 20:24:25 +02:00
Sylvestre Ledru
dc5342d115
hashsum: allow multiple usage of -l and take the last one
...
tested by gnu/tests/cksum/b2sum.sh
2024-05-07 20:24:25 +02:00
Daniel Hofstetter
b64183b0de
fmt: use "unwrap()" instead of "?" in tests
2024-05-07 20:20:59 +02:00
Ben Wiederhake
ea18cfd3d8
fmt: fix error priority, make goal-errors more helpful
2024-05-06 19:36:39 +02:00
ahmadabd
a3d05e5945
fmt: value of minlength should not be negative
...
closes #6354
2024-05-05 21:08:38 +02:00
Ben Wiederhake
e76f92c212
fmt: accept repeated arguments
2024-05-05 16:13:46 +02:00
Laurent Cheylus
14258b12ad
tail: disable clippy::assigning_clones on OpenBSD
...
- Avoid error on OpenBSD stable/7.5 with clippy (lint)
- assigning_clones added in Rust 1.78.0 (1.76 used on OpenBSD 7.5)
https://rust-lang.github.io/rust-clippy/master/index.html#/assigning_clones
Signed-off-by: Laurent Cheylus <foxy@free.fr>
2024-05-05 11:36:35 +02:00
Laurent Cheylus
7a556a6e82
cp: disable clippy::assigning_clones on OpenBSD
...
- Avoid error on OpenBSD stable/7.5 with clippy (lint)
- assigning_clones added in Rust 1.78.0 (1.76 used on OpenBSD 7.5)
https://rust-lang.github.io/rust-clippy/master/index.html#/assigning_clones
Signed-off-by: Laurent Cheylus <foxy@free.fr>
2024-05-05 11:36:35 +02:00
Laurent Cheylus
225a1052a7
df: disable clippy::assigning_clones on OpenBSD
...
- Avoid error on OpenBSD stable/7.5 with clippy (lint)
- assigning_clones added in Rust 1.78.0 (1.76 used on OpenBSD 7.5)
https://rust-lang.github.io/rust-clippy/master/index.html#/assigning_clones
Signed-off-by: Laurent Cheylus <foxy@free.fr>
2024-05-05 11:36:35 +02:00
Jalil David Salamé Messina
ff1a03c284
tr: don't truncate when not translating
...
An additional issue was found while reviewing #6340 , check [this thread][1]. A summary is:
- `tr` ignores the `-t`/`--truncate-set1` flag when not translating
- Not translating is defined as `-d` was passed, or one set was passed.
[1]: https://github.com/uutils/coreutils/pull/6340#discussion_r1590007053
2024-05-04 19:55:49 +02:00
Jalil David Salamé Messina
3c47f27698
tr: calculate complement set early
...
Fixes #6163 and adds a test to verify that a regression is not caused.
Instead of inverting the conditions to check (e.g. delete characters **not** present in set1) invert
set1 when passed the complement flag (`-c`, `-C`, `--complement`). This is done by calculating set1
then "inverting" it by subtracting from the "full" (universe) set (0..=u8::MAX).
This fixes issue 6163 because it was caused by a combination of the `-c` and `-t` flag. `-c` is the
abovementioned complement flag and `-t`/`--truncate-set1` truncates set1 to the length of set2. What
happened in issue 6163 is that `set1={b'Y'}` and `set2={b'Z'}`, when truncated set1 stays the same
and we proceed. The problem is GNU utils does not consider set1 to be `{b'Y'}`, but the complement
of `{b'Y'}`, that is `U \ {b'Y'}={0, 1, ..., b'X', b'Z', ...}`, thus it is truncated to `{0}`.
We can verify this by doing: `printf '\0' | tr -c -t Y Z`, which prints `Z` to stdout as expected.
Additionally, by calculating the complement of set1 we no longer need to consider the complement
flag when doing the translate operation, this allows us to delete a lot of code.
2024-05-04 19:55:49 +02:00
Daniel Hofstetter
c1942daeb1
Merge pull request #6328 from uutils/renovate/proc-macro2-1.x
...
fix(deps): update rust crate proc-macro2 to 1.0.81
2024-05-03 08:50:52 +02:00
renovate[bot]
e5c9796c4b
fix(deps): update rust crate proc-macro2 to 1.0.81
2024-05-03 05:41:47 +00:00
renovate[bot]
c075d78efd
fix(deps): update rust crate wild to 2.2.1
2024-05-03 05:40:58 +00:00
renovate[bot]
5f445871ea
fix(deps): update rust crate quote to 1.0.36
2024-05-03 05:01:12 +00:00
Daniel Hofstetter
19901055a2
clippy: fix warnings introduced with Rust 1.78
2024-05-02 16:47:44 +02:00
renovate[bot]
d9ac8a70c1
fix(deps): update rust crate cpp to 0.5.9
2024-05-02 09:48:51 +00:00
renovate[bot]
e76891726a
chore(deps): update rust crate tempfile to 3.10.1
2024-05-02 07:01:17 +00:00
renovate[bot]
783926806c
chore(deps): update rust crate cpp_build to 0.5.9
2024-05-01 12:37:37 +00:00
Sylvestre Ledru
45bf1991d1
Merge pull request #6251 from tertsdiepraam/multicall-list
...
multicall: add --list to list all utils
2024-05-01 10:17:01 +02:00
Terts Diepraam
3346b4147a
ls
: upgrade uutils-term-grid to 0.5 (#5485 )
2024-05-01 10:16:15 +02:00
Ben Wiederhake
900c3916d5
tail: remove unused spell-checker:disable
2024-04-30 18:28:20 +02:00
Ben Wiederhake
95b36f2d4f
uucore: remove unused spell-checker:disable
2024-04-30 18:28:20 +02:00
Terts Diepraam
b1ba249528
multicall: add --list to list all utils
2024-04-30 17:26:02 +02:00
Laurent Cheylus
ee4392e30c
sort: disable clippy::suspicious_open_options on OpenBSD
...
- Avoid error on OpenBSD stable/7.5 with clippy (lint)
- suspicious_open_options added in Rust 1.77.0 (1.76 used on OpenBSD 7.5)
https://rust-lang.github.io/rust-clippy/master/index.html#/suspicious_open_options
Fix uutils/coreutils#6290
Signed-off-by: Laurent Cheylus <foxy@free.fr>
2024-04-30 10:05:28 +02:00
Ben Wiederhake
4f5a3b4716
id: mark passwd-format and pretty-print as conflicting
...
These are non-sensical to combine, and didn't work reasonably anyway.
Also, passwd-formatting is our own extension, so there is no need for
compatibility anyway.
2024-04-28 23:05:43 +02:00
Ben Wiederhake
e978fe5382
id: permit repeated flags
2024-04-28 22:39:14 +02:00
renovate[bot]
9e52aa0cb1
fix(deps): update rust crate data-encoding-macro to 0.1.15
2024-04-28 10:39:08 +00:00
renovate[bot]
dcf7a50392
fix(deps): update rust crate data-encoding to 2.6
2024-04-28 09:21:27 +00:00
Darius Carrier
5ee9c69f59
kill: adding support for handling SIGEXIT ( #6269 )
...
kill: convert SIGEXT (0) to None so nix takes correct action
2024-04-27 17:33:45 +02:00
Sylvestre Ledru
4090d468c0
Merge pull request #6162 from BenWiederhake/dev-undo-custom-exit-codes
...
all: Undo custom exit codes
2024-04-25 08:11:41 +02:00
Sylvestre Ledru
72b4a0888d
Merge pull request #6268 from jadijadi/fix-netbsd-build
...
Fixing the build issue on NetBSD
2024-04-24 18:26:26 +02:00
Jadi
ac87b73244
Fixing the build issue on NetBSD.
...
The NetBSD was missing for target-os checks on fsext.rs
Fixed #6261
2024-04-24 15:26:02 +00:00
Daniel Hofstetter
91b4ce6426
ls: add uucore/format feature
2024-04-24 17:06:13 +02:00
Daniel Hofstetter
89af8b9769
du,uucore: add words to spell-checker:ignore
2024-04-24 16:54:32 +02:00
Michael Vogt
61e0450c66
du: give -h
output the same precision as GNU coreutils
...
When printing the `du -h` output GNU coreutils does autoscale
the size, e.g.
```
$ truncate -s12M a
$ truncate -s8500 b
$ truncate -s133456345 c
$ truncate -s56990456345 d
$ du -h --apparent-size a b c d
12M a
8,4K b
128M c
54G d
```
Align our version to do the same by sharing the code with `ls`.
Closes : #6159
2024-04-24 16:53:08 +02:00
Michael Vogt
d07fb73630
ls,uucore: extract display human_readable()
helper from ls
...
This commit extract the `display_size()` helper from `ls` into
`uucore` as `human_readable` to be similar to the gnulib helper
so that the human readable display of sizes can be shared between
ls, du, df.
2024-04-24 16:53:08 +02:00
Anton Patrushev
423494421b
more: use dev tty instead of mio to avoid panics ( #6262 )
...
* more: use dev tty instead of mio to avoid panics
* move more specific dependecy to more package
2024-04-23 16:48:21 +02:00
Anirban Halder
421b820ec2
Fix the debug results in cp --debug
( #6220 )
2024-04-22 17:02:21 +02:00
Daniel Hofstetter
d8792d7b69
env: add missing space to help output
2024-04-22 16:56:21 +02:00
Ulrich Hornung
d202baba97
use num_prime for factorisation to fix gnu test
2024-04-21 11:24:25 +02:00
Sylvestre Ledru
64027e5a57
Merge pull request #6252 from sylvestre/hash-error
...
hashsum: improve the error management to match GNU
2024-04-21 09:55:16 +02:00
sreehari prasad
a1717436a4
cp: gnu "same-file" test case compatibility ( #6190 )
...
* cp: -b doesn't ignore "version control" env
* cp: gnu "same-file" test compatibility fix
2024-04-21 09:49:45 +02:00
Sylvestre Ledru
6ef08d7f1c
hashsum: improve the error management to match GNU
...
Should make tests/cksum/md5sum.pl and tests/cksum/sha1sum.pl pass
2024-04-21 09:08:27 +02:00
Sylvestre Ledru
94f5e82dbd
hashsum: ignore empty lines in --check
2024-04-21 09:08:27 +02:00
Sylvestre Ledru
beb7395c84
hashsum: move handle_captures & gnu_re_template move away from the hashsum function
2024-04-21 09:08:27 +02:00
Daniel Hofstetter
c83cec7c0c
env: move unit tests to env.rs
2024-04-21 01:26:50 +02:00
Sylvestre Ledru
4e1dbcd3fc
Merge pull request #6230 from sylvestre/hash-ignore-missing
...
hashsum: implement the ignore-missing option
2024-04-17 23:43:38 +02:00
Sylvestre Ledru
f817018f90
hashsum: --ignore-missing needs -c
2024-04-15 22:19:44 +02:00
Sylvestre Ledru
e194022c1f
Merge pull request #6240 from cakebaker/factor_remove_zero_method
...
factor: remove unused method `zero`
2024-04-15 20:09:49 +02:00
Sylvestre Ledru
40600f2419
Merge pull request #6241 from cakebaker/factor_allow_dead_code
...
factor: suppress some "never used" warnings
2024-04-15 20:09:37 +02:00
Daniel Hofstetter
d60fe6e9e9
factor: suppress some "never used" warnings
2024-04-15 16:40:11 +02:00
Daniel Hofstetter
dd25bab9b5
factor: remove unused method "zero"
2024-04-15 16:10:11 +02:00
Daniel Hofstetter
c9137a8075
od: remove print_width_block field of OutputInfo
2024-04-15 15:16:21 +02:00
Sylvestre Ledru
10def29b96
seq: fuzz PreciseNumber::from_str ( #6183 )
...
* fuzz the seq parse number functions
* run fuzz_parse_number into the CI
2024-04-15 08:07:06 +02:00
Haisham
b617876372
kill: ignore signal case on -s
2024-04-15 03:27:51 +02:00
Haisham
524be6e4ae
kill: accept all casings for signal names in --list
2024-04-15 03:27:51 +02:00
Sylvestre Ledru
7f71611849
Merge pull request #6231 from LucasLarson/copy-recursive-option
...
swap `cp`’s short `-r` and alias `-R` recursive options
2024-04-14 22:09:07 +02:00
Lucas Larson
ffab3a12e7
fix: swap cp
’s short -r
and alias -R
recursive options
...
the only implementable portion of #6223 is “to switch `-R` and `-r`
to `-r` being the alias because `-R` is the POSIX flag”
https://github.com/uutils/coreutils/issues/6223#issuecomment-2054097049
Signed-off-by: Lucas Larson <LucasLarson@riseup.net>
2024-04-14 15:30:17 -04:00
Sylvestre Ledru
b977d61f67
hashsum: implement the ignore-missing option
...
Tested by gnu/tests/cksum/md5sum.pl
2024-04-14 20:05:39 +02:00
Ben Wiederhake
3854569856
tee: ensure that -h and --help are identical
2024-04-14 15:42:13 +02:00
Ben Wiederhake
9527341714
pr: return correct exit code on error
2024-04-14 15:42:13 +02:00
Ben Wiederhake
f5f8cf08e0
hostid: return correct exit code on error
2024-04-14 15:42:13 +02:00
Ben Wiederhake
91679fc747
wc: accept shortcuts for stringly-enum arguments
2024-04-14 15:39:47 +02:00
Ben Wiederhake
a699bfd1fb
uniq: accept shortcuts for stringly-enum arguments
2024-04-14 15:39:46 +02:00
Ben Wiederhake
3285f95eb3
touch: accept shortcuts for stringly-enum arguments
2024-04-14 15:39:46 +02:00
Ben Wiederhake
25245bde65
tee: accept shortcuts for stringly-enum arguments
2024-04-14 15:39:46 +02:00
Ben Wiederhake
88a2ea4f3b
tail: accept shortcuts for stringly-enum arguments
2024-04-14 15:39:46 +02:00
Ben Wiederhake
872ec050e4
sort: accept shortcuts for stringly-enum arguments
2024-04-14 15:39:46 +02:00
Ben Wiederhake
70d84e168c
shred: accept shortcuts for stringly-enum arguments
2024-04-14 15:39:46 +02:00
Ben Wiederhake
1dd7d8e0db
od: accept shortcuts for stringly-enum arguments
2024-04-14 15:39:46 +02:00
Ben Wiederhake
2646944bee
numfmt: accept shortcuts for stringly-enum arguments
2024-04-14 15:39:46 +02:00
Ben Wiederhake
3877d14504
ls: accept shortcuts for stringly-enum arguments
2024-04-14 15:39:46 +02:00
Ben Wiederhake
27a81f3d32
du: accept shortcuts for stringly-enum arguments
2024-04-14 15:39:46 +02:00
Ben Wiederhake
d4546ced26
cp: accept shortcuts for stringly-enum arguments
2024-04-14 15:39:46 +02:00
Ben Wiederhake
4ec82948b6
uucore: properly handle aliases in ShortcutValueParser
2024-04-14 15:39:46 +02:00
Haisham
333e4d9fe9
kill: print --table as vertical ( #6216 )
...
* kill: print --table as vertical
* kill: remove signal padding on --table
* kill: skip exit signal in --table
* kill: replace "skip" with "filter"
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-04-14 15:08:51 +02:00
Jadi
9b4a787be7
kill: return 1 and gnu style stderr in case of no pid ( #6225 )
...
* kill: return 1 and gnu style stderr in case of no pid
closes #6221
* Update src/uu/kill/src/kill.rs
Co-authored-by: Ben Wiederhake <BenWiederhake.GitHub@gmx.de>
---------
Co-authored-by: Ben Wiederhake <BenWiederhake.GitHub@gmx.de>
2024-04-14 14:13:15 +02:00
Daniel Hofstetter
aaaf4c3f91
kill: don't show EXIT with --list
2024-04-14 13:42:55 +02:00
Haisham
693149d683
kill: support multiple signals for --list
2024-04-12 06:21:48 +02:00
Chad Williamson
9d82fa3b9a
mv: avoid attempting to set xattr on redox
2024-04-12 06:16:48 +02:00
Daniel Hofstetter
5bf939aec6
Merge pull request #6207 from BenWiederhake/pr/6069
...
cp: handle update prompt with and without interactive mode enabled
2024-04-11 14:55:26 +02:00
Qiu Chaofan
11c9351a9c
Initial AIX support ( #6209 )
...
* Initial AIX support
Add support to build on AIX operating system. Most of the changes are
in fs part. Since AIX is still tier-3 target, current support is minimal
and does not require passing all tests.
* Fix spell checking failure
2024-04-10 13:40:44 +02:00
Vikrant2691
9b9c0cc237
cp: handle update prompt with and without interactive mode enabled
2024-04-09 15:14:33 +02:00
Sylvestre Ledru
aeafabd23f
Merge pull request #6185 from maxer137/main
...
seq: Removed zero-padding of string when parsing with parse_exponent_no_decimal
2024-04-08 09:14:42 +02:00
Haisham
843407faf8
kill: removed unnecessary calls to print in print_signals
2024-04-07 22:48:15 +02:00
Haisham
6e4c9119fb
kill: print signals vertically
2024-04-07 22:48:15 +02:00