Sylvestre Ledru
ffb70592ec
Merge pull request #5851 from cre4ture/fix/install_invalid_link_at_destination
...
Fix install: invalid link at destination
2024-03-12 08:02:18 +01:00
Ulrich Hornung
7cd754eb1f
Fix install: invalid link at destination
...
also remove some FixMEs for FreeBsd
2024-03-11 23:31:26 +01:00
Sylvestre Ledru
df585edff9
cp: Split the copy_file function a bit
2024-03-11 14:55:22 +01:00
Sylvestre Ledru
89b326fe1e
cp: improve the support of --attributes-only ( #6051 )
...
* cp: improve the support of --attributes-only
* remove useless comments
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-03-11 08:35:27 +01:00
Sylvestre Ledru
80702d5391
Merge pull request #6014 from BenWiederhake/dev-shuf-range-off-by-one
...
shuf: Fix off-by-one errors in range handling
2024-03-10 22:44:12 +01:00
Sylvestre Ledru
fe0c814bd5
Merge pull request #6012 from BenWiederhake/dev-tr-stream
...
tr: Stream output instead of buffering
2024-03-10 22:38:13 +01:00
Sylvestre Ledru
2e8f0e501c
Merge pull request #6039 from BenWiederhake/dev-chcon-repeat-args
...
chcon: Handle repeated flags and overrides between --no-XXX and --XXX
2024-03-10 22:36:57 +01:00
Yury Zhytkou
156d3f7ee7
cut: allow non utf8 characters for delimiters ( #6037 )
2024-03-10 22:36:17 +01:00
Terts Diepraam
a578fe9e55
Merge pull request #6050 from matrixhead/main
...
dd : treat arg as bytes if it contains a 'B'
2024-03-10 12:52:29 +01:00
Yash Thakur
d11d595fda
touch: Respect -h when getting metadata ( #5951 )
...
* Add tests that stat symlinks
* Check follow first in stat
* Don't run tests on FreeBSD
It would be possible to get them to run on FreeBSD by avoiding
get_symlink_times, but the behavior we're testing is not
platform-specific, so it's fine to not test it on FreeBSD.
---------
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2024-03-10 08:05:59 +01:00
Sylvestre Ledru
8c7940260b
Merge pull request #6047 from cakebaker/bump_chrono
...
Bump chrono to 0.4.35 & replace usage of deprecated functions
2024-03-10 07:51:50 +01:00
Ben Wiederhake
8be5f7a89d
chcon: allow repeated flags and arguments
2024-03-09 22:52:55 +01:00
Ben Wiederhake
dbfd4d80ee
chcon: allow overriding between --dereference and --no-dereference
2024-03-09 22:52:55 +01:00
Ben Wiederhake
b233569b9c
shuf: fix error message text on negative-sized ranges
...
Found by @cakebaker:
https://github.com/uutils/coreutils/pull/6011#discussion_r1501838317
2024-03-09 22:51:13 +01:00
Ben Wiederhake
4ee3f68e6a
shuf: fix and test off-by-one errors around ranges
2024-03-09 22:51:13 +01:00
Ben Wiederhake
9cbe6055fa
tr: stream output instead of buffering
...
This should lower memory consumption, and fixes OOM in some scenarios.
2024-03-09 22:51:04 +01:00
Sylvestre Ledru
6c29ed037b
Merge pull request #6042 from BenWiederhake/dev-chown-preserve-root
...
chown+chgrp+chmod: Fix handling of preserve root flag and error messages
2024-03-09 22:44:59 +01:00
mhead
1819cdee3b
dd: treat arg as bytes if it contains 'B'
2024-03-10 01:38:50 +05:30
Ulrich Hornung
dab02d005d
split: close as much fds as needed for opening new one
2024-03-07 23:49:27 +01:00
Ben Wiederhake
bf5d7f786b
chmod: slightly adjust error message when preserve-root is triggered
...
One of the GNU tests checks for the exact error message.
2024-03-07 14:49:41 +01:00
Daniel Hofstetter
aad8f7d8b5
touch: replace use of deprecated chrono functions
2024-03-06 18:16:49 +01:00
Daniel Hofstetter
c45c00eed4
ls: use chrono::TimeDelta::try_seconds instead of
...
deprecated chrono::TimeDelta::seconds
2024-03-06 17:51:19 +01:00
Ulrich Hornung
294c9de3ae
extend error message for case when writer instanciation fails second time
2024-03-05 20:43:25 +01:00
Ben Wiederhake
cd70d7dec1
cat: ignore -u flag, just like GNU does
2024-03-01 23:56:30 +01:00
Ben Wiederhake
472b56f0ff
cat: fix -b and -n anti-symmetry
2024-03-01 23:56:30 +01:00
Ben Wiederhake
100a48fda9
cat: permit repeating command-line flags
2024-03-01 23:56:30 +01:00
Daniel Hofstetter
aa0d15d1ac
Merge pull request #6011 from BenWiederhake/dev-shuf-repeat-zero-items
...
shuf: Refuse repeating zero lines
2024-02-27 15:28:06 +01:00
Daniel Hofstetter
ae7d03cb15
Merge pull request #6007 from BenWiederhake/dev-basexx-multi-arg
...
base32/base64/basenc: implement and test proper flag parsing
2024-02-27 15:03:47 +01:00
Daniel Hofstetter
8b2a2921c5
Merge pull request #6018 from BenWiederhake/dev-basename-multi-arg
...
basename: Fix handling of repeated flags/arguments
2024-02-27 10:03:14 +01:00
Matei Mantu
095eced4be
chmod: Fix chmod -c --reference reporting when no change is made ( #6016 )
...
* Make fperm hold 6 digit octal permission. Set it to 4 digits when displaying
* Add test
* Make every permission 4 octal digits
* Change test name to be more suggestive
* chmod: merge two args in test
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-02-26 11:01:50 +01:00
Ben Wiederhake
f905d9ce41
basename: implement and test repeated flags and arguments
...
Note in particular that `args_override_self` would *NOT* work here,
since it would in all cases cause `options::NAME` to override itself,
or interfere with `trailing_var_arg`.
2024-02-25 19:45:32 +01:00
Ben Wiederhake
9441806a23
basename: test flag implications, document -z correctly
2024-02-25 19:14:17 +01:00
Ben Wiederhake
6834b593ee
shuf: refuse repeating zero lines
...
This was a GNU behavior bug:
```console
$ LC_ALL=C shuf -er
shuf: no lines to repeat
[$? = 1]
$ cargo run shuf -er # old, bad (unexpected success)
$ cargo run shuf -er # new
shuf: no lines to repeat
[$? = 1]
```
2024-02-25 16:49:03 +01:00
Sylvestre Ledru
174864566e
Merge pull request #6006 from BenWiederhake/dev-tr-multi-arg
...
tr: Correctly handle multiple appearances of flag-args
2024-02-25 09:51:40 +01:00
Sylvestre Ledru
8301a8e5be
Merge pull request #5980 from BenWiederhake/dev-shuf-number-speed
...
shuf: Fix OOM crash for huge number ranges
2024-02-25 09:50:49 +01:00
Yury Zhytkou
17174ab986
uniq
: pass remaining GNU tests (#5994 )
2024-02-25 09:45:37 +01:00
Ben Wiederhake
f25b2102db
shuf: document new benchmark category
2024-02-24 21:36:13 +01:00
Ben Wiederhake
445905a045
base32/base64/basenc: permit repeating -d/-i/-w flags
2024-02-24 21:11:18 +01:00
Ben Wiederhake
36e142aa15
basenc: use last given encoding, instead of priority list
2024-02-24 20:44:07 +01:00
Ben Wiederhake
44310f426c
tr: enable passing -t multiple times
2024-02-24 18:37:45 +01:00
Ben Wiederhake
268af90843
tr: enable passing -s multiple times
2024-02-24 18:37:45 +01:00
Ben Wiederhake
352a8a5bd7
shuf: handle --input-range with huge number ranges
...
This requires special handling, because we cannot always generate all
possible strings beforehand, e.g. in the case of "-n 2 -i 0-2147483647".
2024-02-24 18:33:46 +01:00
Ben Wiederhake
989178f438
shuf: extract minimal required interface between data and core loop
2024-02-24 18:33:46 +01:00
Ben Wiederhake
dc664006fe
tr: enable passing -d multiple times
2024-02-23 11:58:22 +01:00
Ben Wiederhake
cad94a69be
tr: prevent passing options in the wrong place
...
Note: This requires using the DEPRECATED item Command::trailing_var_arg
in clap. This is going to be another
[problem with clap](https://github.com/tertsdiepraam/uutils-args/blob/main/docs/design/problems_with_clap.md ).
2024-02-23 11:58:22 +01:00
Ben Wiederhake
d9b6675bbf
tr: enable passing -c multiple times
2024-02-23 11:58:18 +01:00
Daniel Hofstetter
5a2e0c700e
Merge pull request #5990 from BenWiederhake/dev-shuf-head-null
...
shuf: Do not read input when -n0 is given
2024-02-23 09:01:14 +01:00
Ben Wiederhake
617f3a8b6f
tr: when deleting and squeezing, never complement set2
2024-02-23 06:08:37 +01:00
Ben Wiederhake
48c4b57c97
tr: require second string argument when deleting and squeezing
2024-02-23 03:23:07 +01:00
Ben Wiederhake
a29f68b720
shuf: Do not read input when -n0 is given
...
This is explicitly tested by some suites, including the GNU test suite.
2024-02-22 23:50:03 +01:00