1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-14 11:07:59 +00:00
Commit graph

4055 commits

Author SHA1 Message Date
Justin Tracey
ff8a31e835
wc: fix escaping
GNU wc only escapes file names with newlines in them.
2024-12-27 11:37:16 -05:00
Daniel Hofstetter
f62b8d7975 csplit: allow offset without sign in pattern 2024-12-27 16:08:48 +01:00
Daniel Hofstetter
20dfb27057 cut: fix handling of newline as delimiter 2024-12-27 09:12:47 +01:00
Solomon
98c9be5ec4
mv: improve move-to-self error handling (#6995)
- improve move-to-self detection, so this errors without data loss:

```diff
 mkdir mydir
 mv mydir mydir/subdir
-mv: No such file or directory (os error 2)
+mv: cannot move 'mydir' to a subdirectory of itself, 'mydir/subdir'
```

- align "cannot move source to a subdirectory of itself" and "same file"
  errors more closely with coreutils:

```diff
 mkdir mydir
 mv mydir/ mydir/..
-mv: cannot move 'mydir/' to a subdirectory of itself, 'mydir/../mydir/'
+mv: 'mydir/' and 'mydir/../mydir' are the same file
```

Causing: https://github.com/nushell/nushell/issues/13082
2024-12-26 20:48:29 +01:00
Sylvestre Ledru
b4cdc36573
Merge pull request #6997 from cakebaker/echo_handle_double_hyphen
echo: handle double hyphens
2024-12-26 12:19:07 +01:00
Daniel Hofstetter
db37c316af csplit: add support for -q 2024-12-26 09:40:55 +01:00
Daniel Hofstetter
90465357e2 echo: handle double hyphens 2024-12-24 17:01:45 +01:00
Daniel Hofstetter
2c2f5f14a4 echo: use succeeds() to simplify some tests 2024-12-24 16:03:00 +01:00
Daniel Hofstetter
d3db8dc29f
Merge pull request #6987 from sylvestre/setcap
ls: when a file has capabilities (setcap), change the color
2024-12-22 17:12:35 +01:00
Sylvestre Ledru
9a97c18877 ls: when a file has capabilities (setcap), change the color
Should fix tests/ls/capability.sh
2024-12-22 16:17:05 +01:00
Daniel Hofstetter
392c48002c cut: don't merge adjacent ranges 2024-12-22 15:07:04 +01:00
Sylvestre Ledru
913d5d413b
Merge pull request #6957 from karlmcdowall/sort_merge_chunking_rework
sort: Rework merge batching logic
2024-12-21 23:19:44 +01:00
Daniel Hofstetter
a152687d48
Merge pull request #6971 from sylvestre/mkfifo
mkfifo: better handle the mode + umask
2024-12-21 15:31:15 +01:00
Sylvestre Ledru
31ffc3a0eb mkfifo: better handle the mode + umask
Should make tests/misc/mknod.sh pass
2024-12-20 18:17:52 +01:00
Daniel Hofstetter
cf8a81c6c2 cut: fix overriding of -d= 2024-12-20 10:02:36 +01:00
Daniel Hofstetter
6224c374ae cut: use short and long args in two tests 2024-12-18 16:17:30 +01:00
Daniel Hofstetter
5ea4903632 cut: rename some tests 2024-12-18 14:52:04 +01:00
Daniel Hofstetter
9aca24365f cut: simplify test by removing assert_eq! calls 2024-12-18 14:44:12 +01:00
Daniel Hofstetter
2f82853bfa cut: move two tests to better places within file 2024-12-18 14:42:18 +01:00
Daniel Hofstetter
d414dbc83b basenc: ignore case with "--base16 --decode" 2024-12-17 10:52:25 +01:00
Sylvestre Ledru
6755956bc4
cut.pl: adjust to our messages as they are better (#6921)
* cut.pl: adjust to our messages as they are better

but we still have some differences on this test

* cut: add some missing line return when needed

* cut: add failing tests covered by cut.pl

* Remove dup test

* cut: add spell-checker:ignore line to test

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-12-16 15:37:29 +01:00
Karl McDowall
6bdcad32da sort: Rework merge batching logic
Fix bug #6944
Rework the way batching is done with sort such that it doesn't open
more input files than necessary. Previously, the code would always
open one extra input file which causes problems in ulimit scenarios.
Add additional test case.
2024-12-15 12:40:15 -07:00
Daniel Hofstetter
ee0426e3f3 seq: use allow_hyphen_values instead of
allow_negative_numbers because clap removed support for "exotic" negative
numbers like -.1
2024-12-15 16:14:01 +01:00
Daniel Hofstetter
209ec0b817
Merge pull request #6929 from RenjiSann/cksum-fixes
cksum: even more fixes
2024-12-12 10:16:48 +01:00
Dorian Péron
958222a07c test(cksum): un-ignore tests that are now implemented 2024-12-12 09:49:53 +01:00
Dorian Péron
df16c1c655 test(cksum): Add tests 2024-12-10 13:09:04 +01:00
Sylvestre Ledru
c60203ddd3
stat: improve GNU compatibility (#6933)
* stat: fix the quotes when dealing with %N

and other formats
should fix
tests/stat/stat-fmt.sh

* stats: use an enum instead of a string

* stats: split the functions into smaller functions

* stat: handle byte as a format for better display

* stat: handle error better. should make tests/stat/stat-printf.pl pass

* stat: Some escape sequences are non-standard

* Fix tests

* Take comments into account
2024-12-10 08:48:52 +01:00
Daniel Hofstetter
2a9e7c937a
Merge pull request #6906 from sylvestre/base-wrap
base32/base64: handle two corner cases
2024-12-09 13:55:15 +01:00
Daniel Hofstetter
2a406d8cbb sort: adapt fixtures to change in unicode-width 2024-12-09 09:20:19 +01:00
Daniel Hofstetter
1f6f7fbe8c tests/seq: fix ticket references of ignored tests 2024-12-07 17:04:05 +01:00
Daniel Hofstetter
e654645974 tests/seq: use stdout_only() to remove no_stderr() 2024-12-07 16:59:13 +01:00
aimerlief
367cc19d45
fix(seq): handle 0e... scientific notation without padding (#6934)
* fix(seq): handle 0e... scientific notation without padding

- Updated the parse_exponent_no_decimal function to treat 0e... as zero.
- Added test cases to verify correct behavior for 0e15 and -w 0e15.

Fix: #6926

* fix(seq): improved parse for accurate BigDecimal handling

* apply missing cargo fmt formatting adjustments
2024-12-07 16:42:34 +01:00
Arthur Pin
88e10478bc tests/seq: test scientific notation with uppercase 'E' 2024-12-06 18:00:39 -03:00
Sylvestre Ledru
93dfc933bd base32/base64: handle two corner cases
* no padding
* --wrap 0

+ remove property_tests.rs, we don't need such tests as the
code is already tests by test_base* (+ it is too dependant
on the code structure)

Should make base64.pl pass
2024-12-04 22:02:57 +01:00
Sylvestre Ledru
18496735da
Merge pull request #6923 from sylvestre/more-terms
uucore: add alacritty to the list of terminals that support colors
2024-12-04 14:05:00 +01:00
Sylvestre Ledru
a644724137 uucore: add foot to the list of terminals that support colors 2024-12-04 13:25:24 +01:00
Sylvestre Ledru
0780e26914
Revert "install: create destination file with safer modes before copy" 2024-12-04 11:08:28 +01:00
Daniel Hofstetter
d878f6c774
Merge pull request #6907 from sylvestre/tr2
tr: generate an error for real if the input is a directory
2024-12-04 10:20:08 +01:00
Chen Chen
a5867bdf34 install: create destination file with safer modes before copy 2024-12-04 10:02:16 +01:00
andreistan26
5b087e9624
Fix cut when lines dont end with specified delim (#5844)
Print lines without delimiters only when they end with specified line terminator('\n' by default or `\0` if `-s`)

Signed-off-by: Andrei Stan <andreistan2003@gmail.com>
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2024-12-04 00:04:55 +01:00
Sylvestre Ledru
843c0c2c0f
Merge pull request #6119 from hamflx/fix/invalid-backup-numbered-path
mv: fix invalid numbered backup path
2024-12-03 23:13:39 +01:00
Anirban Halder
a16630fded
rm: fix the usage of '/..' '/.' with -rf options
fix the test tests/rm/r-4

---------

Co-authored-by: Julian Beltz <MJayBeltz@gmail.com>
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2024-12-03 22:51:03 +01:00
Sylvestre Ledru
3e4221a461 tr: generate an error for real if the input is a directory 2024-12-03 21:38:28 +01:00
Sylvestre Ledru
9877085702
Revert "mv: show "same file" error for mv d/f d" 2024-12-02 20:39:39 +01:00
Sylvestre Ledru
527bb6fad8
Merge pull request #5788 from cakebaker/mv_same_file
mv: show "same file" error for `mv d/f d`
2024-12-02 20:37:41 +01:00
Julian
2799b288e3
tail: fix issue #6543 (--pid when reading from stdin) (#6582)
---------

Co-authored-by: just-an-engineer <Julian.Beltz@zetier.com>
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2024-12-02 19:04:36 +01:00
Daniel Hofstetter
2e4b7c8cb7 mv: show "same file" error for "mv d/f d" 2024-12-02 10:27:10 +01:00
hamflx
6b32c30d57 mv: fix invalid numbered backup path 2024-12-02 10:22:55 +01:00
Simone Ragusa
f0b7d322d1 dircolors: patch test fixture to include alacritty support 2024-12-02 10:03:52 +01:00
Daniel Hofstetter
6a7c0112cb
Merge pull request #6853 from sylvestre/comm
comm: generate an error if the input is a directory
2024-11-30 10:55:14 +01:00