Sylvestre Ledru
31875a241f
touch/gnu compat: 'touch no-file' exit code should be 1
2021-06-02 23:50:35 +02:00
Sylvestre Ledru
eb2c06c37e
touch/gnu compat: when touch fails because of a permission error, change the error message
...
+ return 1 as error code when having this error
2021-06-02 23:48:16 +02:00
Sylvestre Ledru
e7f5916864
gnu/ci: allow to run a single gnu test (and document it)
2021-06-02 23:48:13 +02:00
Sylvestre Ledru
0105531b7f
show the backtrace in case of a rust crash
2021-06-02 23:37:34 +02:00
Jan Scheer
5898b99627
truncate: add error handling for SIZE argument
...
* add tests for SIZE argument
* fix clap argument handling for --size and --reference
2021-06-02 22:08:42 +02:00
Jan Scheer
2f5f7c6fa1
split: use "parse_size" from uucore
...
* make stderr of parsing SIZE/NUMBER argument consistent with GNU's behavior
* add error handling
* add tests
2021-06-02 21:32:41 +02:00
Michael Debertol
ed69d797b5
ln: reject --relative without --symbolic
2021-06-02 21:02:12 +02:00
Michael Debertol
87570bbc10
ln: remove redundant force
flag
...
This information is already encoded in the `OverwriteMode` enum.
2021-06-02 20:56:37 +02:00
Sylvestre Ledru
eb6e6d49eb
Merge pull request #2333 from tertsdiepraam/pr/fix-current-time-test
...
`pr`: fix usage of current time in tests
2021-06-02 20:09:50 +02:00
Michael Debertol
efa89de463
ln: fix LINK_NAME in help output
2021-06-02 19:58:29 +02:00
Michael Debertol
7ffc7d073c
cp: test that file descriptors are closed
2021-06-02 19:21:16 +02:00
Michael Debertol
e5c4681e04
tests: add the ability to set resource limits
2021-06-02 19:21:12 +02:00
Sylvestre Ledru
d8c06dd6bb
use clap::crate_version macro instead of the env variable
2021-06-02 19:00:19 +02:00
Sylvestre Ledru
6aa53ead7c
rustfmt the recent change
2021-06-02 18:43:35 +02:00
Terts Diepraam
48516cc06a
pr: fix usage of current time
2021-06-02 17:18:07 +02:00
Michael Debertol
dfaaa8c787
Merge branch 'master' of https://github.com/uutils/coreutils into cp/close-fd
2021-06-02 11:37:37 +02:00
Sylvestre Ledru
132ddf98b6
Merge pull request #2328 from miDeb/seq/validator
...
seq: reject NaN arguments
2021-06-02 11:20:13 +02:00
Sylvestre Ledru
f5b01a61cc
Merge pull request #2331 from miDeb/cp/linux-cow-errors
...
cp: show errors in cow on linux
2021-06-02 10:19:03 +02:00
Jan Scheer
6b8de1dd8b
sort: use "parse_size" from uucore
...
* make parsing of SIZE argument consistent with GNU's behavior
* add error handling
* add tests
2021-06-02 05:13:57 +02:00
Mitchell Mebane
850a56ccea
dircolors: rustfmt
2021-06-01 19:22:17 -05:00
Mitchell Mebane
efe1850087
dircolors: replace getopts with clap
...
Port argument parsing from getopts to clap.
The only difference I have observed is that clap auto-generates -h and
-V short options for help and version, and there is no way (in clap 2.x)
to disable them.
2021-06-01 19:22:08 -05:00
Michael Debertol
fc2b61eb96
tests: typo
2021-06-01 23:06:51 +02:00
Michael Debertol
a323e9cda1
cp: show errors in cow on linux
2021-06-01 23:06:38 +02:00
Jan Scheer
a900c7421a
od: use "parse_size" from uucore
2021-06-01 22:07:29 +02:00
Michael Debertol
23f89d1494
cp: close file descriptors after cow on linux
...
Instead of using into_raw_fd(), which transfers ownership and
requires us to close the file descriptor manually,
use as_raw_fd(), which does not transfer ownership to us but drops the
file descriptor when the original file is dropped (in our case at the
end of the function).
2021-06-01 22:04:19 +02:00
Michael Debertol
5329d77cc2
seq: adapt output to GNU seq
2021-06-01 20:35:18 +02:00
Sylvestre Ledru
3cf966810f
Merge pull request #2327 from miDeb/sort/debug-invalid
...
sort: fix debug output for zeros / invalid numbers
2021-06-01 20:12:13 +02:00
Michael Debertol
9b29ac98a5
seq: reject NaN arguments
...
Move the validation logic to an argument validator.
2021-06-01 18:30:18 +02:00
Michael Debertol
67b83647ac
sort: simplify handling of negative zeros
...
We can simply parse the sign of negative zero as positive, instead of
handling the comparison of zeros differently.
2021-06-01 18:20:24 +02:00
Michael Debertol
06b3092f5f
sort: fix debug output for zeros / invalid numbers
...
We were reporting "no match" when sorting something like "0 ". This is
because we don't distinguish between 0 and invalid lines when sorting.
For debug output we have to get this information back.
2021-06-01 18:18:51 +02:00
Jan Scheer
cc659c8572
Merge branch 'master' of github.com:uutils/coreutils into refactoring_parse_size
2021-06-01 12:35:48 +02:00
Jan Scheer
3c7175f00d
head/tail: add fixes and tests for bytes/lines NUM arg (undocumented sign)
...
* change tail bytes/lines clap parsing to fix posix override behavior
* change tail bytes/lines NUM parsing logic to be consistent with head
2021-06-01 12:17:11 +02:00
Sylvestre Ledru
3625d98fc3
Merge pull request #2326 from tertsdiepraam/ls/hide-ignore-help-text
...
`ls`: add help text and value name for `--hide` and `--ignore`
2021-06-01 11:41:39 +02:00
Terts Diepraam
1dc4ab92d9
ls: add help text and value name for --hide and --ignore
2021-06-01 10:27:50 +02:00
Sylvestre Ledru
448c8419d3
Merge pull request #2325 from tertsdiepraam/fix-sum-help-text
...
`sum`: fix help text for System V argument
2021-06-01 10:25:35 +02:00
Jan Scheer
a3e047ff16
uucore: add more tests to parse_size
2021-06-01 10:22:44 +02:00
Terts Diepraam
c1f2d41a27
sum: fix help text for system v argument
2021-06-01 09:54:49 +02:00
Jan Scheer
84f2bff778
head: use "parse_size" from uucore
2021-06-01 09:30:43 +02:00
Sylvestre Ledru
a017c1b589
Merge pull request #2323 from miDeb/maint/spellcheck-all
...
maint: actually run spellcheck on all files
2021-05-31 23:36:56 +02:00
Sylvestre Ledru
8618771f2e
Merge pull request #2322 from miDeb/seq/improvements
...
seq: improve compatibility
2021-05-31 23:09:13 +02:00
Michael Debertol
46470fc607
refactor/rmdir: polish spelling
2021-05-31 22:46:06 +02:00
Michael Debertol
41878f1bf4
refactor/pr: polish spelling
2021-05-31 22:46:01 +02:00
Sylvestre Ledru
fef8ba57d7
Merge pull request #2321 from sylvestre/pr-test
...
Fix clippy warnings in the pr tests
2021-05-31 22:42:33 +02:00
Michael Debertol
8de42ed18e
maint: actually run spellcheck on all files
...
**/* must be quoted, otherwise it is expanded by the shell and not
literally passed to cspell.
2021-05-31 22:40:12 +02:00
Sylvestre Ledru
7b7185f916
Fix clippy warnings in the pr tests
2021-05-31 21:20:55 +02:00
Michael Debertol
4cf18e96f3
seq: change default value for -t and remove dubious escape sequences
...
GNU seq does not support -t, but always outputs a newline at the end.
Therefore, our default for -t should be \n.
Also removes support for escape sequences (interpreting a literal "\n"
as a newline). This is not what GNU seq is doing, and unexpected.
2021-05-31 21:20:19 +02:00
Michael Debertol
c78cc65421
seq: make arguments required
...
Right now seq panics when invoked without args.
2021-05-31 21:20:19 +02:00
Michael Debertol
6ccc305513
seq: implement integer sequences
...
If we notice that we can represent all arguments as BigInts, take a
different code path. Just like GNU seq this means we can print an
infinite amount of numbers in this case.
2021-05-31 21:20:12 +02:00
Sylvestre Ledru
badf7aacb7
Merge pull request #2300 from tertsdiepraam/pr
...
Implement `pr` (resurrection of the resurrected PR)
2021-05-31 21:14:57 +02:00
Sylvestre Ledru
15da98d84e
Merge pull request #2315 from rivy/maint.fmt+spell
...
Spell check and correct the project
2021-05-31 21:00:04 +02:00