Commit graph

1237 commits

Author SHA1 Message Date
Jeong YunWon
1fecd98ebe bytes operation for pathchk 2021-06-10 18:30:45 +09:00
Jeong YunWon
357886b599 Remove unnessassary chars() and unwrap_or() from tail 2021-06-10 18:06:40 +09:00
Terts Diepraam
96dffc8700
Merge pull request #2384 from sylvestre/getopt
remove a legacy declaration to getopt
2021-06-10 10:45:16 +02:00
Jeong YunWon
9c6750252d du winapi dependency only for windows 2021-06-10 15:07:46 +09:00
Jeong YunWon
ded92dbca0 clean up fold, hashsum, kill 2021-06-10 13:11:36 +09:00
Jeong YunWon
1ac4eb171e move cmode rather than mut 2021-06-10 13:11:36 +09:00
Jeong YunWon
797c4a340e Remove trivially unnessessary unwrap() from od 2021-06-10 13:11:36 +09:00
Jeong YunWon
da9558c684 Remove trivially unnessessary unwrap() from expr 2021-06-10 13:11:36 +09:00
Jeong YunWon
774c01f008 Remove trivially unnessessary unwrap() from du 2021-06-10 13:11:36 +09:00
Jeong YunWon
3eae399ec4 Remove trivially unnessessary unwrap() from base32/64 2021-06-10 13:11:36 +09:00
Sylvestre Ledru
6d7d57e13c remove a legacy declaration to getopt 2021-06-09 22:58:50 +02:00
Sylvestre Ledru
393164f4a7
Merge pull request #2377 from tertsdiepraam/use-atty
`cat`/`cut`/`tty`/`nohup`: replace `is_std{in, out, err}_interactive` with atty
2021-06-09 22:42:56 +02:00
Terts Diepraam
44f6dc6098 whoami: remove advapi32-sys dependency 2021-06-09 22:10:28 +02:00
Terts Diepraam
e73743eb0d more: simpler page_down 2021-06-09 21:56:32 +02:00
Terts Diepraam
40720dc52d more: rewrite drawing logic 2021-06-09 21:00:48 +02:00
Jeong YunWon
7009cb0486 Add "process" dependency to groups/Cargo.toml 2021-06-10 01:07:01 +09:00
Terts Diepraam
be8e5f5f30 use the same spec for atty everywhere 2021-06-09 17:15:42 +02:00
Terts Diepraam
394eb82af1 cat/cut/tty/nohup: replace is_std{in, out, err}_interactive with atty 2021-06-09 17:12:03 +02:00
Jan Scheer
1b824f4914 fix clippy warnings 2021-06-09 15:56:29 +02:00
Terts Diepraam
3818e54415 who: cleanup argument handling 2021-06-09 14:34:37 +02:00
Jan Scheer
be8650278b Merge branch 'master' into refactoring_parse_size 2021-06-09 13:44:40 +02:00
Sylvestre Ledru
4471335609
Merge pull request #2360 from rivy/fix+rf
build and *lots* of clippy fixes
2021-06-08 22:06:11 +02:00
Jan Scheer
26ad05cbb4 uucore: fix order of group IDs returned from entries::get_groups()
As discussed here: https://github.com/uutils/coreutils/pull/2361
the group IDs returned for GNU's 'group' and GNU's 'id --groups'
starts with the effective group ID.
This implements a wrapper for `entris::get_groups()` which mimics
GNU's behaviour.

* add tests for `id`
* add tests for `groups`
* fix `id --groups --real` to no longer ignore `--real`
2021-06-08 18:39:05 +02:00
Terts Diepraam
448caa3d1c ln: refactor argument handling 2021-06-07 14:53:18 +02:00
Roy Ivy III
423f4f9bf1 fix/cp ~ correct cargo clippy complaint exception (*allow* clippy::unnecessary_wraps) 2021-06-06 19:28:25 -05:00
Roy Ivy III
3f0ac06122 refactor/od ~ fix cargo clippy complaint (*allow* clippy::enum_variant_names) 2021-06-06 19:28:25 -05:00
Roy Ivy III
8f0d42da39 refactor/wc ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:24 -05:00
Roy Ivy III
a8a2b3ec84 refactor/timeout ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:24 -05:00
Roy Ivy III
6e98ea78ac refactor/stdbuf ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:24 -05:00
Roy Ivy III
c8c14ca40c refactor/stat ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:24 -05:00
Roy Ivy III
79a33728ca refactor/split ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:24 -05:00
Roy Ivy III
39dbcda66e refactor/sort ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:24 -05:00
Roy Ivy III
08713d22ec refactor/shred ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:24 -05:00
Roy Ivy III
2f7c488425 refactor/rmdir ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:24 -05:00
Roy Ivy III
84e08cd071 refactor/ptx ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:24 -05:00
Roy Ivy III
750b68a44c refactor/printf ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:24 -05:00
Roy Ivy III
ad486a77dc refactor/pr ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:24 -05:00
Roy Ivy III
f7028c4175 refactor/pinky ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:24 -05:00
Roy Ivy III
02f35c8965 refactor/pathchk ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:24 -05:00
Roy Ivy III
b3dd80d39c refactor/printf ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:24 -05:00
Roy Ivy III
94f5011662 refactor/od ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:24 -05:00
Roy Ivy III
63112783b2 refactor/numfmt ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:24 -05:00
Roy Ivy III
ca50eae003 refactor/mv ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:23 -05:00
Roy Ivy III
768b343ff9 refactor/mktemp ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:23 -05:00
Roy Ivy III
5889d81fde refactor/mkfifo ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:23 -05:00
Roy Ivy III
380e28dde5 refactor/mkdir ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:23 -05:00
Roy Ivy III
99fae850ae refactor/ls ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:23 -05:00
Roy Ivy III
e8e28f1508 refactor/ln ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:23 -05:00
Roy Ivy III
4a09c72fe7 refactor/join ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:23 -05:00
Roy Ivy III
c66d67a0b9 refactor/install ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:23 -05:00
Roy Ivy III
9f2cb2e5e9 refactor/hashsum ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:23 -05:00
Roy Ivy III
2bf06c3104 refactor/fold ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:23 -05:00
Roy Ivy III
28e176cbba refactor/expr ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:23 -05:00
Roy Ivy III
489f9e8386 refactor/expand ~ fix cargo clippy complaint (clippy::manual_str_repeat) 2021-06-06 19:28:23 -05:00
Roy Ivy III
122d82e835 refactor/expand ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:23 -05:00
Roy Ivy III
9964a21fe3 refactor/env ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:23 -05:00
Roy Ivy III
b08c568748 refactor/echo ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:23 -05:00
Roy Ivy III
3409dc93e3 refactor/du ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:23 -05:00
Roy Ivy III
14bb9ec616 refactor/csplit ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:22 -05:00
Roy Ivy III
1e418e8d84 refactor/chroot ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:22 -05:00
Roy Ivy III
baa656ca8a refactor/chown ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:22 -05:00
Roy Ivy III
35b360b8e4 refactor/chmod ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:22 -05:00
Roy Ivy III
c115ad4274 refactor/cat ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:22 -05:00
Roy Ivy III
777e3906f8 refactor/basename ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:22 -05:00
Roy Ivy III
c192550f22 refactor ~ polish spelling + add spelling exceptions 2021-06-06 19:28:22 -05:00
Roy Ivy III
1ef820212c refactor/rm ~ fix cargo clippy warning (clippy::upper_case_acronyms) 2021-06-06 19:17:18 -05:00
Roy Ivy III
3cfb956684 refactor/du ~ fix cargo clippy warning (clippy::ptr_arg) 2021-06-06 19:17:18 -05:00
Jan Scheer
12de58aec0 Merge branch 'master' of github.com:uutils/coreutils into refactoring_parse_size 2021-06-06 22:54:02 +02:00
Jan Scheer
884f570125 du/od/sort: refactor - replace map_or_else with unwrap_or_else 2021-06-06 21:55:39 +02:00
Sylvestre Ledru
a3b520abde
Merge pull request #2363 from sylvestre/doc-hashsum
hashsum: document how to benchmark blake2
2021-06-06 21:28:23 +02:00
Michael Debertol
d6da143c4e sort: ignore errors when waiting for child 2021-06-06 19:53:28 +02:00
Michael Debertol
7c9da82b39 sort: implement --batch-size 2021-06-06 18:01:08 +02:00
Michael Debertol
8d213219c7 sort: implement --compress-program 2021-06-06 18:01:08 +02:00
Michael Debertol
5a5c7c5a34 sort: properly check for empty reads 2021-06-06 18:01:08 +02:00
Michael Debertol
66359a0f56 sort: insert line separators after non-empty files
If files don't end witht a line separator we have to insert one,
otherwise the last line will be combined with the first line of the next
file.
2021-06-06 18:01:08 +02:00
Michael Debertol
2dd6824e76 sort: never use a bigger buffer than requested
A min buffer size of 8KB makes sense in practice, but decreases testability.
2021-06-06 18:01:08 +02:00
Sylvestre Ledru
7f07bd82d4 hashsum: document how to benchmark blake2 2021-06-06 13:26:45 +02:00
Sylvestre Ledru
27456fc8fb
Merge pull request #2296 from oconnor663/blake2b_simd
switch from blake2-rfc to blake2b_simd
2021-06-06 13:14:39 +02:00
Terts Diepraam
6324df890f
Merge pull request #2357 from deantvv/more-show-next-file
more: Show next file at bottom line
2021-06-06 10:52:03 +02:00
Dean Li
b9fe76ab92
more: Show next file at bottom line
Implement feature requested in #2318.
2021-06-06 09:26:47 +08:00
Sylvestre Ledru
9ae3c7634c
Merge pull request #2354 from tertsdiepraam/more/fix-not-showing-last-line
`more`: Do not accidentically hide last line
2021-06-05 16:05:43 +02:00
Terts Diepraam
2760efb01d more: fix test 2021-06-05 14:42:43 +02:00
Terts Diepraam
420e9322ea more: do not accidentically hide last line 2021-06-05 14:07:09 +02:00
Sylvestre Ledru
285b27c9b3 du: add --app as alias of --apparent-size to match GNU 2021-06-05 11:04:42 +02:00
Sylvestre Ledru
4143e3f54f
Merge pull request #2332 from mitchellmebane/dircolors-clap
dircolors: replace getopts with clap
2021-06-05 10:12:57 +02:00
Sylvestre Ledru
9712ecb4d5
Merge pull request #2340 from deantvv/more-unicode
more: fix unicode bug
2021-06-04 19:51:32 +02:00
Michael Debertol
e7fa6715a7 Merge branch 'master' of https://github.com/uutils/coreutils into ln/dst-symlink 2021-06-04 19:42:19 +02:00
Dean Li
acd290d11f
more: fix unicode bug for breakline
- Use `unicode_segmentation` and `unicode_width` to determine proper `break_line` position.
- Keep track of total_width as suggested by @tertsdiepraam.
- Add unittest for ZWJ unicode case

Related to #2319.
2021-06-04 22:06:27 +08:00
Jan Scheer
f8e96150f8 fix clippy warnings and spelling
* add some missing LICENSE headers
2021-06-04 15:39:34 +02:00
Mitchell Mebane
754082886c dircolors: Address code review comments 2021-06-03 20:49:25 -05:00
Jan Scheer
130bf49e5d Merge branch 'master' of github.com:uutils/coreutils into refactoring_parse_size 2021-06-03 22:32:34 +02:00
Sylvestre Ledru
6a8d15f92e gnu/rm: match gnu's output 2021-06-03 22:19:14 +02:00
Jan Scheer
db3ee61742 du/sort/od/stdbuf: make error handling of SIZE/BYTES/MODE arguments more consistent
* od: add stderr info for not yet implemented '--strings' flag
2021-06-03 21:00:03 +02:00
Jan Scheer
ad26b7a042 head/tail/split: make error handling of NUM/SIZE arguments more
consistent

* add tests for each flag that takes NUM/SIZE arguments
* fix bug in tail where 'quiet' and 'verbose' flags did not override each other POSIX style
2021-06-03 20:37:29 +02:00
Michael Debertol
6c46d09397 ln: canonicalize the parent directory of dst, not dst
dst may or may not exist. In case it exists it might already be a symlink.
In neither case we should try to canonicalize dst, only its parent directory.

https://www.gnu.org/software/coreutils/manual/html_node/ln-invocation.html
> Relative symbolic links are generated based on their canonicalized
> **containing directory**, and canonicalized targets.
2021-06-03 19:10:22 +02:00
Michael Debertol
af8f47ea6a ln: remove redundant check
if `dst.exists()` and `settings.overwrite` is `OverwriteMode::Force`,
we already delete the file in the match above.
2021-06-03 16:30:45 +02:00
Sylvestre Ledru
841b689477
Merge pull request #2334 from sylvestre/crate_version
use crate_version!() instead of reading the env + rustfmt
2021-06-03 10:56:57 +02:00
Sylvestre Ledru
24032498ad
Merge pull request #2339 from sylvestre/gnu-compat
Improve the gnu compat and use it for "touch"
2021-06-03 10:53:47 +02:00
Sylvestre Ledru
963a0da0b4
Merge pull request #2288 from syukronrm/du-time
du: fix `--time` behavior
2021-06-03 07:56:41 +02:00
Syukron Rifail M
05aeaf3061 du: fix --time behavior 2021-06-03 08:18:23 +07:00