Terts Diepraam
101e55702c
more: simplify and fix logic for multiple files
2021-05-29 12:35:03 +02:00
Sylvestre Ledru
3d42d41a72
Merge pull request #2247 from jfinkels/truncate-split-three-functions
...
truncate: re-organize truncate() into one function for each mode of operation
2021-05-29 10:31:02 +02:00
Sylvestre Ledru
0746b3e1e6
Merge pull request #2292 from Gilnaa/2121-factor-clap
...
Moved factor to use clap
2021-05-29 10:30:06 +02:00
Sylvestre Ledru
c2544a6f37
Merge pull request #2299 from jhscheer/users
...
users: fix long_help text and clippy warning
2021-05-29 09:26:04 +02:00
Jan Scheer
714661774b
users: fix long_help text and clippy warning
2021-05-29 02:34:43 +02:00
Jan Scheer
a2947f6897
fix clippy warning
2021-05-29 00:46:25 +02:00
Michael Debertol
bb268d1500
sort: crash when failing to open an input file ( #2265 )
...
* sort: crash when failing to open an input file
Instead of ignoring files we fail to open, crash.
The error message does not exactly match gnu, but that would require
more effort.
* use split_whitespace instead of a manual implementation
* fix expected error on windows
* sort: update expected error message
2021-05-28 22:39:33 +02:00
Michael Debertol
e9656a6c32
sort: make GNU test sort-debug-keys pass ( #2269 )
...
* sort: disable support for thousand separators
In order to be compatible with GNU, we have to disable thousands
separators. GNU does not enable them for the C locale, either.
Once we add support for locales we can add this feature back.
* sort: delete unused fixtures
* sort: compare -0 and 0 equal
I must have misunderstood this when implementing, but GNU considers
-0, 0, and invalid numbers to be equal.
* sort: strip blanks before applying the char index
* sort: don't crash when key start is after key end
* sort: add "no match" for months at the first non-whitespace char
We should put the "^ no match for key" indicator at the first
non-whitespace character of a field.
* sort: improve support for e notation
* sort: use maches! macros
2021-05-28 22:38:29 +02:00
Sylvestre Ledru
9442f26fdb
Merge pull request #2283 from Mikadore/master
...
Closing #1916 - Concluding the test refactor
2021-05-28 22:36:47 +02:00
Jan Scheer
0bf14da490
tail: use "parse_size" from uucore
2021-05-28 22:21:03 +02:00
Jan Scheer
b1b3475e11
truncate: use "parse_size" from uucore
2021-05-28 22:21:03 +02:00
Jan Scheer
0c502f587b
uucore: add new module "parse_size"
...
This adds a function to parse size strings, e.g. "2KiB" or "3MB".
It is based on similar functions used by head/tail/truncate, etc.
2021-05-28 22:20:31 +02:00
Sylvestre Ledru
a2143dcfbf
Merge pull request #2293 from miDeb/maint-minrustv
...
maint: adapt code to new MinRustV
2021-05-28 21:48:51 +02:00
Terts Diepraam
1c2540a613
Add atty to dev-deps for more tests
2021-05-28 21:07:38 +02:00
Jack O'Connor
80b9bfdd18
switch from blake2-rfc to blake2b_simd
2021-05-28 14:08:46 -04:00
Sylvestre Ledru
fe42808e9b
Merge branch 'master' into implement-more
2021-05-28 19:49:48 +02:00
Terts Diepraam
0a2f74fd8e
More: update crossterm dependency
2021-05-28 19:43:03 +02:00
Michael Debertol
b5cbd506bc
maint: remove trailing commas from matches
...
Trailing commas are only supported starting from 1.48.
2021-05-28 18:58:06 +02:00
Gilad Naaman
6a9ffee548
Moved factor to use clap
...
Issue: https://github.com/uutils/coreutils/issues/2121
2021-05-28 19:48:28 +03:00
Terts Diepraam
c7930a63f7
Merge pull request #2285 from blesson3/cp-backup-arg-fix
...
cp: fix regressed issue with `--backup` and `-b`
2021-05-28 18:44:09 +02:00
Michael Debertol
a9e0208ee2
maint: remove obsolete attributes
2021-05-28 18:03:47 +02:00
Michael Debertol
59a42f1254
maint: format recent changes
2021-05-28 18:03:47 +02:00
Michael Debertol
263b122540
maint: use the matches! macro when possible
2021-05-28 18:03:37 +02:00
Sylvestre Ledru
222bd81190
Merge pull request #2291 from tertsdiepraam/remove-tempdir
...
Replace `tempdir` with `tempfile`
2021-05-28 10:45:19 +02:00
Sylvestre Ledru
80e972c168
Merge pull request #2290 from tertsdiepraam/msrv-1.43
...
Bump MSRV to 1.43.1
2021-05-28 10:39:46 +02:00
Tyler
d0b4fe34c1
Refactor. Returns code to buildable
...
- Pushes file/stdout specific logic to trait objects.
- Extracts read/write helper
- Extracts conv/block/unblock helper
- Impl block
- WIP: Many failing tests!
2021-05-27 15:55:29 -07:00
Terts Diepraam
835a17d79f
mktemp: use tempfile instead of custom tempdir
2021-05-27 22:48:10 +02:00
Terts Diepraam
ebe6341ae3
chore: replace tempdir with tempfile
2021-05-27 22:47:03 +02:00
Terts Diepraam
825476f573
Update tempfile
2021-05-27 20:25:24 +02:00
Terts Diepraam
052ee22ce0
Bump MSRV to 1.43.1
2021-05-27 18:20:15 +02:00
Mikadore
29f6dd1f35
Fixed warning
2021-05-27 16:55:14 +02:00
Sylvestre Ledru
41539df91d
Merge pull request #2280 from jhscheer/symlink_tests
...
Improve symlink/hardlink handling in tests
2021-05-27 09:41:48 +02:00
Terts Diepraam
aec8f2c151
Merge pull request #2284 from blesson3/mv-backup-refactor
...
mv: refactor backup logic to use shared uucore backup control
2021-05-27 08:49:36 +02:00
Matt Blessed
41bea72f23
cp: fix regressed issue with --backup
and -b
...
- add test for regressed issue
2021-05-26 18:29:03 -04:00
Matt Blessed
f11f5f3abb
mv: refactor backup logic to use shared uucore backup control
...
- add mv backup tests
2021-05-26 18:23:48 -04:00
Mikadore
5e1d52d4be
cargo-fmt :DDD
2021-05-26 22:20:16 +02:00
Mikadore
64598d9e26
Closing #1916
2021-05-26 22:15:28 +02:00
Terts Diepraam
b4f6c81810
Merge pull request #2281 from deantvv/chmod-match-gnu-error
...
chmod: match GNU error
2021-05-26 21:13:05 +02:00
Terts Diepraam
658e52dde0
Merge pull request #2275 from blesson3/cp-backup-support
...
cp: implement backup support
2021-05-26 21:12:01 +02:00
Matt Blessed
25ed5eeb0e
cp: move option check to uumain and use show_usage_error
...
- add test for conflicting options `--backup` and `--no-clobber`
2021-05-26 11:10:04 -04:00
Dean Li
fe25b51a66
chmod: match GNU error
...
Related to #2260
Signed-off-by: Dean Li <deantvv@gmail.com>
2021-05-26 22:31:02 +08:00
Terts Diepraam
00dd8d29cb
Merge pull request #2213 from syukronrm/du-clap
...
du: replace getopts with clap
2021-05-26 16:15:36 +02:00
Sylvestre Ledru
c08eae8e9a
Merge pull request #2276 from ycd/clear-macros
...
uucore: delete unused macros
2021-05-26 13:45:30 +02:00
Jan Scheer
efd5921bda
tests/test: replace call to 'ln -s' with call to 'AtPath::symlink_file'
2021-05-26 13:42:12 +02:00
Sylvestre Ledru
2f58f92b06
Merge pull request #2277 from ycd/refactor-error-macro
...
uucore: refactor show_error! macro
2021-05-26 13:13:24 +02:00
Jan Scheer
6a70d89e8c
tests/du: replace call to 'ln' with call to 'AtPath::hard_link'
2021-05-26 12:55:53 +02:00
Jan Scheer
afb1b9efb4
tests/util: add AtPath::hard_link
2021-05-26 12:53:11 +02:00
Syukron Rifail M
eda72b5208
du: replace getopts with clap
2021-05-26 11:23:05 +07:00
Matt Blessed
a8a1ec7faf
cp: implement backup control with tests
2021-05-25 23:22:32 -04:00
Yağız can Değirmenci
12f207a6d6
test: fix tests
2021-05-26 03:21:53 +03:00