Commit graph

1301 commits

Author SHA1 Message Date
Anup Mahindre
d6181ce7d4 du: Add threshold argument support
- Add --threshold parameter and corresponding logic to skip listing
entires that don't adhere to the threshold
2021-06-12 19:56:05 +05:30
Michael Debertol
af6e92e012 Merge branch 'master' of https://github.com/uutils/coreutils into sort/args 2021-06-12 13:16:46 +02:00
Michael Debertol
a69c2d52f9 Merge branch 'master' of https://github.com/uutils/coreutils into timeout/cmd-args 2021-06-12 13:14:16 +02:00
Michael Debertol
a57313f01b core: represent signal values by their index 2021-06-12 13:12:15 +02:00
Terts Diepraam
440eba628c
Merge pull request #2338 from miDeb/ln/dst-symlink
ln: canonicalize the parent directory of the destination, not the destination itself
2021-06-12 11:28:19 +02:00
Terts Diepraam
8afc923796
Merge pull request #2237 from wfscheper/wfscheper/issue2118
chgrp: replace getopts with clap (#2118)
2021-06-12 11:20:24 +02:00
Terts Diepraam
7f754dc1a5
Merge pull request #2382 from tertsdiepraam/more/rewrite-drawing-logic
`more`: rewrite drawing logic
2021-06-12 11:12:29 +02:00
Jan Scheer
39f5f70f2b Merge branch 'master' into refactoring_parse_size 2021-06-12 02:24:07 +02:00
Terts Diepraam
b7460a61a9
Merge pull request #2398 from youknowone/err-return
clean up returning Err
2021-06-12 00:14:28 +02:00
Michael Debertol
b8d4411291 sort: fix ignore-leading-blanks long option 2021-06-11 20:46:23 +02:00
Michael Debertol
fb035aa049 sort: allow --check=<value> syntax
* --check=silent and --check=quiet, which are equivalent to -C.
* --check=diagnose-first, which is the same as --check

We also allow -c=<value>, which confuses GNU sort.
2021-06-11 20:46:23 +02:00
Michael Debertol
cc0df6ea43 sort: move options to the options module
Be more consistent with other utilities
2021-06-11 20:46:23 +02:00
Michael Debertol
f909751155 timeout: don't kill the process if -k is not set
`timeout` used to set the timeout to 0 when -k was not set. This
collided with the behavior of 0 timeouts, which disable the timeout.
When -k is not set the process should not be killed.
2021-06-11 20:44:25 +02:00
Terts Diepraam
ddb196dd1d chgrp: fix clippy and spell-check warnings 2021-06-11 17:24:12 +02:00
Jeong YunWon
6734d5df93 basename: trim separators with function 2021-06-11 23:35:15 +09:00
Jeong YunWon
6003d95974 comm: clean up line-end check 2021-06-11 23:35:15 +09:00
Jeong YunWon
9e8be3093f chown: clean up parse_spec 2021-06-11 23:27:09 +09:00
Jeong YunWon
b59c1dae59 stdbuf: clean up returning Err 2021-06-11 23:26:58 +09:00
Jeong YunWon
9c56a40bcb shuf: clean up returning Err 2021-06-11 23:26:58 +09:00
Jeong YunWon
2dd9822d57 rmdir: clean up returning Err 2021-06-11 23:26:58 +09:00
Jeong YunWon
7cc4bf6e36 pr: clean up returning Err 2021-06-11 23:26:58 +09:00
Jeong YunWon
e45f5404db nl: fix clippy error 2021-06-11 23:26:58 +09:00
Jeong YunWon
3ea18173cb od: clean up returning Err 2021-06-11 23:26:58 +09:00
Jeong YunWon
d329c7c864 install : clean up returning Err 2021-06-11 23:26:58 +09:00
Jeong YunWon
27ce4bb0a4 head: clean up returning Err 2021-06-11 23:26:58 +09:00
Jeong YunWon
bbae78db67 expr: clean up returning Err 2021-06-11 23:26:58 +09:00
Jeong YunWon
f01121f5b7 env: clean up returning Err 2021-06-11 23:26:58 +09:00
Jeong YunWon
6736faec4a csplit: clean up returning Err 2021-06-11 23:26:58 +09:00
Jeong YunWon
7cc17c15c2 cp: clean up returning Err 2021-06-11 23:26:58 +09:00
Jeong YunWon
526ed7afdc cksum: clean up returning Err 2021-06-11 23:26:58 +09:00
Jeong YunWon
a197d35039 chown: clean up returning Err 2021-06-11 23:26:58 +09:00
Jeong YunWon
c5594bc9bc base32: clean up returning Err 2021-06-11 23:26:58 +09:00
Terts Diepraam
4abe4c4ac5 Merge branch 'master' into more/rewrite-drawing-logic 2021-06-11 14:03:11 +02:00
Terts Diepraam
f104f8868c
Merge pull request #2356 from syukronrm/du-x
du: add `--one-file-system`
2021-06-11 13:51:28 +02:00
Terts Diepraam
960828ba70
Merge pull request #2376 from deantvv/more-option-d
more: Implement option '-d'
2021-06-11 13:49:13 +02:00
Syukron Rifail M
0c364e635b du: add --one-file-system 2021-06-11 16:18:57 +07:00
Walter Scheper
cff75f242a chgrp: replace getopts with clap (#2118) 2021-06-10 16:38:44 -04:00
Michael Debertol
32f5e8baf8 Merge branch 'master' of https://github.com/uutils/coreutils into ln/dst-symlink 2021-06-10 21:48:43 +02:00
Yagiz Degirmenci
3347dacfc8
chroot: refactor undocumented features (#2365) 2021-06-10 21:46:17 +02:00
Sylvestre Ledru
e35cafd2f2
Merge pull request #2370 from tertsdiepraam/ln/update-arg-handling
`ln`: refactor argument handling and fix #2359
2021-06-10 21:39:43 +02:00
Sylvestre Ledru
d79268de05
Merge pull request #2374 from tertsdiepraam/who/cleanup-arg-handling
`who`: cleanup argument handling
2021-06-10 21:38:11 +02:00
Sylvestre Ledru
be9104b084
Merge pull request #2383 from tertsdiepraam/whoami/use-winapi
`whoami`: remove `advapi32-sys` dependency and use `winapi`
2021-06-10 21:34:50 +02:00
Sylvestre Ledru
667af7ea16
Merge pull request #2388 from youknowone/du-winapi
du winapi dependency only for windows
2021-06-10 21:31:08 +02:00
Sylvestre Ledru
de6829fec3
Merge pull request #2390 from youknowone/tr-reuse-chars
tr parse_sequence reuses chars iterator
2021-06-10 21:30:28 +02:00
Sylvestre Ledru
cadd7810ef
Merge pull request #2393 from youknowone/pathchk
bytes operation for pathchk
2021-06-10 21:30:14 +02:00
Jeong YunWon
0a1dcc27bb
prevent utf8 iteration for ascii str from shred (#2389) 2021-06-10 21:29:56 +02:00
Sylvestre Ledru
c6d8932698
Merge pull request #2392 from youknowone/tail
Remove unnessassary chars() and unwrap_or() from tail
2021-06-10 21:28:58 +02:00
Michael Debertol
b4efd5a749 timeout: disable pre-existing SIGCHLD handlers
Needed to make a GNU test pass
2021-06-10 21:24:43 +02:00
Michael Debertol
0f9bc8e974 timeout: disable timeout if it is set to zero 2021-06-10 21:24:43 +02:00
Michael Debertol
8e0ed2d20e timeout: support --verbose 2021-06-10 21:24:43 +02:00
Michael Debertol
ed646090c2 timeout: fix usage string 2021-06-10 17:03:39 +02:00
Michael Debertol
c5d7cbda32 timeout: handle arguments for the command to run
To prevent clap from parsing flags for the command to run as flags for
timeout, remove the "args" positional argument, but allow to pass flags
via the "command" positional arg.
2021-06-10 17:03:32 +02:00
Michael Debertol
5997853cc4 Merge branch 'master' of https://github.com/uutils/coreutils into ln/dst-symlink 2021-06-10 16:06:32 +02:00
Dean Li
dc57e1535e
more: Implement option '-d'
Implement option '-d' (silent mode)

Related to #2320
2021-06-10 19:34:21 +08:00
Jeong YunWon
8433c7726d tr parse_sequence reuses chars iterator 2021-06-10 19:16:55 +09:00
Jeong YunWon
b9611b71ee use ? operator for od 2021-06-10 18:39:48 +09:00
Jeong YunWon
b21d189fcf Remove trivially unnessessary unwrap() pr 2021-06-10 18:39:48 +09:00
Jeong YunWon
cc6c2f64b1 clean up fold, hashsum, kill, nl, printf, truncate 2021-06-10 18:39:48 +09:00
Jeong YunWon
3ee09fa783 only matches Some() in match 2021-06-10 18:39:11 +09:00
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
Jan Scheer
00c05b8687 id: add error handling (stderr/exit_code) for '-ugG' 2021-06-10 00:19:23 +02:00
Sylvestre Ledru
6d7d57e13c remove a legacy declaration to getopt 2021-06-09 22:58:50 +02:00
Jan Scheer
026570ff9c id: add more tests for '--zero'
* fix clippy warnings
2021-06-09 22:45:39 +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
Jan Scheer
babf6ecae4 Merge branch 'master' into id_zero_2351 2021-06-08 23:22:29 +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
Jan Scheer
98225105af id: implement '--zero' flag
* add tests for '--zero' flag
* add a bunch of requires/conflicts rules for flags (incl. tests)
2021-06-07 14:35:13 +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