Sylvestre Ledru
7d807f3e73
Merge pull request #3642 from Garfield96/shuf-find-seps
...
shuf: improve performance
2022-06-19 17:00:08 +02:00
Sylvestre Ledru
7c49bf4bd1
the cat /dev/random can be too long, use the Shakespeare text
2022-06-19 16:59:44 +02:00
Phil Gebhardt
c49d8e6113
cp: make --b=simple
protective of source
...
When `--backup` is supplied, `cp` will take a backup of *destination* before *source* is copied. When `--backup=simple` is supplied, it is possible for the backup path for *destination* to equal the path for *source*, destroying source before the copy is made. This change prevents this by returning an error instead.
This fixes https://github.com/uutils/coreutils/issues/3629
2022-06-18 03:56:46 -07:00
Sylvestre Ledru
ad05b2f7cb
Ignore word "tmpfs"
2022-06-18 08:32:40 +02:00
Christian Menges
35e97fe88a
shuf: update BENCHMARKING.md
...
Signed-off-by: Christian Menges <christian.menges@outlook.com>
2022-06-17 20:57:04 +02:00
Daniel Hofstetter
edf4fee48f
unexpand: implement "tabs" shortcuts
2022-06-17 14:31:40 +02:00
Daniel Hofstetter
1655e85a13
expand: simplify signature of expand_shortcuts()
2022-06-16 15:59:41 +02:00
Christian Menges
19a43bf1b7
shuf: improve performance
...
Use memchr crate to speed up splitting input data by a separator.
Signed-off-by: Christian Menges <christian.menges@outlook.com>
2022-06-16 13:23:44 +02:00
Sylvestre Ledru
9cfb92df3f
Merge pull request #3612 from cakebaker/ticket_3575
...
expand: add support for "--tabs" shortcuts
2022-06-16 13:18:38 +02:00
Sylvestre Ledru
e232bb49f3
Merge pull request #3639 from cakebaker/dircolors_quote
...
dircolors: escape "'" and ":"
2022-06-16 10:05:58 +02:00
Terts Diepraam
bc4f193b5a
Merge pull request #3630 from sylvestre/gnu-sleep
...
sleep: customize one of the tests (tests/misc/sleep.sh)
2022-06-15 19:50:33 +02:00
Daniel Hofstetter
46b4b94c42
dircolors: escape "'" and ":"
2022-06-15 15:22:14 +02:00
Sylvestre Ledru
5920de5adc
Merge pull request #3614 from sylvestre/rm-ioctl
...
cp: Replace ioctl-sys by libc for the call to ficlone
2022-06-15 09:07:44 +02:00
Sylvestre Ledru
1747b20cf0
sleep: return 1 is no arg + customize one of the tests (tests/misc/sleep.sh)
2022-06-15 08:57:30 +02:00
Sylvestre Ledru
2fcf892dbc
cp: Replace ioctl-sys by libc for the call to ficlone
2022-06-14 16:01:44 +02:00
Sylvestre Ledru
b242e6592c
Merge pull request #3617 from jfinkels/dd-float-format-stats-2
...
dd: only print concise byte counts if count is sufficiently large
2022-06-14 08:01:28 +02:00
Sylvestre Ledru
81a9106b76
Merge pull request #3622 from cakebaker/remove_unnecessary_spaces
...
du: remove unnecessary spaces from help
2022-06-13 19:26:49 +02:00
Daniel Hofstetter
dc94a08196
du: remove unnecessary spaces from help
2022-06-13 16:25:22 +02:00
Sylvestre Ledru
a07f331665
Merge branch 'main' into dependabot/cargo/strum_macros-0.24.1
2022-06-13 16:01:46 +02:00
Sylvestre Ledru
a4ce3011fd
Merge pull request #3619 from uutils/dependabot/cargo/strum-0.24.1
...
build(deps): bump strum from 0.24.0 to 0.24.1
2022-06-13 16:01:18 +02:00
Sylvestre Ledru
76d6a4a889
Merge pull request #3613 from Ganneff/lswidthoctal
...
Forbid octal numbers for width parameter
2022-06-13 16:00:36 +02:00
dependabot[bot]
28786a0fb4
build(deps): bump strum_macros from 0.24.0 to 0.24.1
...
Bumps [strum_macros](https://github.com/Peternator7/strum ) from 0.24.0 to 0.24.1.
- [Release notes](https://github.com/Peternator7/strum/releases )
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Peternator7/strum/commits )
---
updated-dependencies:
- dependency-name: strum_macros
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 08:50:59 +02:00
dependabot[bot]
502cd11713
build(deps): bump strum from 0.24.0 to 0.24.1
...
Bumps [strum](https://github.com/Peternator7/strum ) from 0.24.0 to 0.24.1.
- [Release notes](https://github.com/Peternator7/strum/releases )
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Peternator7/strum/commits )
---
updated-dependencies:
- dependency-name: strum
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 08:50:50 +02:00
Sylvestre Ledru
b1fbbb6ede
doc: ignore a 'typo'
2022-06-13 08:49:35 +02:00
Sylvestre Ledru
a5861e8b43
Merge pull request #3605 from cakebaker/set_value_name
...
unexpand: set value name of arg
2022-06-12 16:03:06 +02:00
Sylvestre Ledru
e62ff8cd0b
Merge pull request #3600 from patricksjackson/dd-reuse-buffer
...
dd: reuse buffer for the most common cases
2022-06-12 16:02:39 +02:00
Sylvestre Ledru
f36b58854b
Merge pull request #3593 from str4d/2930-hashsum-isolate-non-gnu-options
...
hashsum: Refactor `uu_app` to isolate non-"GNU Coreutils" options
2022-06-12 16:01:34 +02:00
Joerg Jaspert
fd1e0e6dd7
Correctly parse numbers starting with 0 as octal
2022-06-12 12:55:33 +02:00
Jeffrey Finkelstein
a375644c50
dd: only print concise byte counts if large enough
...
Update `dd` to only print a concise form of the number of bytes with
an SI prefix (like "1 MB" or "2 GB") if the number is at least
1000. Similarly, only print the concise form with an IEC prefix (like
"1 MiB" or "2 GiB") if the number is at least 1024. For example,
$ head -c 999 /dev/zero | dd > /dev/null
1+1 records in
1+1 records out
999 bytes copied, 0.0 s, 999.0 KB/s
$ head -c 1000 /dev/zero | dd > /dev/null
1+1 records in
1+1 records out
1000 bytes (1000 B) copied, 0.0 s, 1000.0 KB/s
$ head -c 1024 /dev/zero | dd > /dev/null
2+0 records in
2+0 records out
1024 bytes (1 KB, 1024 B) copied, 0.0 s, 1.0 MB/s
2022-06-11 23:16:16 -04:00
Sylvestre Ledru
98cf16586e
Merge pull request #3603 from cakebaker/return_result_instead_of_crash
...
unexpand: return Result instead of calling crash!
2022-06-11 19:55:20 +02:00
Sylvestre Ledru
3461b6c452
Merge pull request #3607 from jhscheer/cut_fix_delimiter
...
cut: fix argument parsing for the delimiter
2022-06-11 19:54:48 +02:00
anastygnome
8693eaa3b9
Remove unnecessary trailing space when using the comma format (-m)
...
unnecessary trailing space was being added. because we were padding for alignment,
which is not required with -m
fixes #3608
Signed-off-by: anastygnome <noreplygitemail@protonmail.com>
2022-06-11 08:41:08 +02:00
Joerg Jaspert
aec63c06fd
Forbid octal numbers for width parameter
2022-06-10 23:42:16 +02:00
Daniel Hofstetter
e3cac647f6
expand: add support for "--tabs" shortcuts
...
Fixes #3575
2022-06-10 13:55:27 +02:00
Jack Grigg
fccab8a691
hashsum: Refactor uu_app
to isolate non-"GNU Coreutils" options
...
Several binaries have been added to `hashsum` that have never been part
of GNU Coreutils:
- `sha3*sum` (uutils/coreutils#869 )
- `shake*sum` (uutils/coreutils#987 )
- `b3sum` (uutils/coreutils#3108 and uutils/coreutils#3164 )
In particular, the `--bits` option, and the `--no-names` option added in
uutils/coreutils#3361 , are not valid for any GNU Coreutils `*sum` binary
(as of Coreutils 9.0).
This commit refactors the argument parsing so that `--bits` and
`--no-names` become invalid options for the binaries intended to match
the GNU Coreutils API, instead of being ignored options. It also
refactors the custom binary name handling to distinguish between
binaries intended to match the GNU Coreutils API, and binaries that
don't have that constraint.
Part of uutils/coreutils#2930 .
2022-06-10 10:07:00 +02:00
Patrick Jackson
881f0c3d06
dd: add BENCHMARKING instructions
2022-06-10 10:06:54 +02:00
Patrick Jackson
a186adbff1
dd: fixing clippy warnings.
2022-06-10 10:06:54 +02:00
Patrick Jackson
4cc058a789
dd: reuse buffer for the most common cases
2022-06-10 10:06:54 +02:00
Daniel Hofstetter
0c0e4dbda4
unexpand: return Result instead of calling crash!
2022-06-10 10:06:28 +02:00
Daniel Hofstetter
d8f73c3f24
unexpand: set value name of arg
2022-06-10 10:06:24 +02:00
dependabot[bot]
6412232e2b
build(deps): bump exacl from 0.8.0 to 0.9.0
...
Bumps [exacl](https://github.com/byllyfish/exacl ) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/byllyfish/exacl/releases )
- [Changelog](https://github.com/byllyfish/exacl/blob/main/CHANGELOG.md )
- [Commits](https://github.com/byllyfish/exacl/compare/v0.8.0...v0.9.0 )
---
updated-dependencies:
- dependency-name: exacl
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-10 10:06:13 +02:00
Jan Scheer
fa64407cb0
cut: fix argument parsing for the delimiter
...
This fixes the argument parsing for the delimiter for the two special
cases `-d=` and `-d ''`.
2022-06-09 22:14:43 +02:00
Junji Wei
1ba0bfc67a
mktemp: respect POSIXLY_CORRECT env var when parsing args
...
Signed-off-by: Junji Wei <harukawei99@gmail.com>
2022-06-09 20:51:51 +08:00
Sylvestre Ledru
702a0b7a34
Merge pull request #3558 from uutils/dependabot/cargo/once_cell-1.12.0
...
build(deps): bump once_cell from 1.11.0 to 1.12.0
2022-06-07 15:06:52 +02:00
Sylvestre Ledru
d7b7b7f8c1
Merge pull request #3595 from cakebaker/specifier_only_allowed_with_last_value
...
expand: allow specifier only with last value
2022-06-07 15:06:40 +02:00
Sylvestre Ledru
0532c743f1
Merge pull request #2695 from jhscheer/tail_notify
...
`tail` overhaul (--follow=name, etc.)
2022-06-07 12:05:16 +02:00
Jeffrey Finkelstein
6da070cdd3
mktemp: error on empty --suffix in some situations
...
Make `mktemp` exit with an error if the `--suffix` option is the empty
string and the template argument does not end in an "X". Previously,
the program succeeded.
Before this commit,
$ mktemp --suffix= aXXXb
apBEb
After this commit,
$ mktemp --suffix= aXXXb
mktemp: with --suffix, template 'aXXXb' must end in X
2022-06-06 21:24:59 -04:00
dependabot[bot]
5a42c06b25
build(deps): bump once_cell from 1.11.0 to 1.12.0
...
Bumps [once_cell](https://github.com/matklad/once_cell ) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/matklad/once_cell/releases )
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md )
- [Commits](https://github.com/matklad/once_cell/compare/v1.11.0...v1.12.0 )
---
updated-dependencies:
- dependency-name: once_cell
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 19:18:28 +00:00
Sylvestre Ledru
3a45f00fed
Merge pull request #3312 from uutils/dependabot/cargo/rust-ini-0.18.0
...
build(deps): bump rust-ini from 0.17.0 to 0.18.0
2022-06-06 21:13:59 +02:00
Jan Scheer
e8834597f3
Merge branch 'main' into tail_notify
2022-06-06 16:00:46 +02:00
Daniel Hofstetter
3c18da471d
dircolors: update error message
2022-06-06 14:56:46 +02:00
Jan Scheer
beb2b7cf5e
tail: use functionality from uucore::error
where applicable
...
* minor code clean-up
* remove test-suite summary from README
2022-06-06 14:36:51 +02:00
Daniel Hofstetter
804240164b
expand: allow specifier only with last value
2022-06-06 14:15:33 +02:00
Sylvestre Ledru
fc5aedfbb7
Merge pull request #3594 from cakebaker/handle_too_large_tab_stop
...
expand: handle too large tab size
2022-06-06 13:39:19 +02:00
dependabot[bot]
82e81da967
build(deps): bump bytecount from 0.6.2 to 0.6.3
...
Bumps [bytecount](https://github.com/llogiq/bytecount ) from 0.6.2 to 0.6.3.
- [Release notes](https://github.com/llogiq/bytecount/releases )
- [Commits](https://github.com/llogiq/bytecount/commits )
---
updated-dependencies:
- dependency-name: bytecount
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 10:07:55 +02:00
Sylvestre Ledru
3f203c7ab1
Merge pull request #3586 from jfinkels/mktemp-multiple-x-sequences
...
mktemp: only replace last contiguous block of Xs
2022-06-06 10:06:44 +02:00
Sylvestre Ledru
63347abd19
Merge pull request #3592 from anastygnome/fork
...
Implement the --sync flag for df. (fixes #3564 )
2022-06-06 10:05:51 +02:00
Sylvestre Ledru
c4c6d42f02
Merge pull request #3591 from jhscheer/fix_3589
...
dircolors: add support for stdin "-" (fix : #3589 )
2022-06-06 10:04:42 +02:00
Daniel Hofstetter
c14ff14e99
expand: handle too large tab size
2022-06-05 13:49:11 +02:00
anastygnome
54590c0507
Implement the --sync flag for df. ( fixes #3564 )
...
This PR reuses the defined --sync flag for df, which was previously a
no-op, assigns its default value and uses the fact that
get_all_filesystems takes CLI options as a parameter to perform a sync
operation before any fs call.
Fixes #3564
Signed-off-by: anastygnome <noreplygitemail@protonmail.com>
2022-06-05 09:43:59 +02:00
Sylvestre Ledru
c874802285
Add a word to the spell ignore list
2022-06-05 09:32:24 +02:00
Sylvestre Ledru
e2782e2f75
Merge pull request #3583 from cakebaker/ticket_3574
...
expand: show error if --tabs arg has invalid chars
2022-06-05 09:31:21 +02:00
Jan Scheer
e0efd6cc90
tail: update readme
...
* add clippy fixes
* add cicd fixes
2022-06-03 13:35:58 +02:00
Daniel Hofstetter
9651cff6c0
expand: show error if --tabs arg has invalid chars
...
Fixes #3574
2022-06-03 10:36:42 +02:00
Jan Scheer
f1b38e94cd
dircolors: add support for stdin "-" ( fix : #3589 )
2022-06-03 02:08:09 +02:00
Terts Diepraam
626ed43e05
ls: fix double quoting when color is enabled
...
When color was enabled the escape_name function was called twice which led to names like `hello world` being displayed as `"'hello world'".
2022-06-03 00:29:56 +02:00
Jan Scheer
70fed83305
tail: refactor and fixes to pass more GNU test-suite checks
...
* add fixes to pass:
- tail-2/F-vs-rename.sh
- tail-2/follow-name.sh
- tail-2/inotify-hash-abuse.sh
- tail-2/inotify-only-regular.sh
- tail-2/retry.sh
* add/improve documentation
2022-06-02 17:11:51 +02:00
Jan Scheer
8ee806a444
Merge branch 'main' into tail_notify
2022-06-02 16:31:25 +02:00
Sylvestre Ledru
68cc9312c8
Merge pull request #3585 from cakebaker/multiple_tabs
...
expand: allow multiple "tabs" args
2022-06-02 10:08:45 +02:00
Sylvestre Ledru
aeb01c6f52
Merge pull request #3563 from sylvestre/hard-to-sym
...
ln: Implement -L -P to make tests/ln/hard-to-sym.sh work
2022-06-02 08:19:17 +02:00
Jeffrey Finkelstein
cff7833bf6
mktemp: only replace last contiguous block of Xs
...
Fix a bug in which `mktemp` would replace everything in the template
argument from the first 'X' to the last 'X' with random bytes, instead
of just replacing the last contiguous block of 'X's.
Before this commit,
$ mktemp XXX_XXX
2meCpfM
After this commit,
$ mktemp XXX_XXX
XXX_Rp5
This fixes test cases `suffix2f` and `suffix2d` in
`tests/misc/mktemp.pl` in the GNU coreutils test suite.
2022-06-01 18:21:21 -04:00
Sylvestre Ledru
08fed8fb7b
Merge pull request #3541 from cakebaker/split_set_names_for_arg_values
...
split: set names for arg values
2022-06-01 23:12:36 +02:00
Sylvestre Ledru
36e5b60617
Merge pull request #3566 from cakebaker/print_ls_colors
...
dircolors: implement --print-ls-colors
2022-06-01 23:11:57 +02:00
Sylvestre Ledru
06c2aea1b4
ln: Implement -L -P to make tests/ln/hard-to-sym.sh work
2022-06-01 23:03:50 +02:00
Daniel Hofstetter
864c666467
expand: allow multiple "tabs" args
2022-06-01 16:18:57 +02:00
Jeffrey Finkelstein
43e9fb73b1
mktemp: simplify file path parameter logic
...
Simplify the logic of computing the file path parameters (the
directory, prefix, suffix, and number of random characters) for the
temporary file created by `mktemp`. This commits adds an `Options`
struct as a layer of indirection between the application logic and
`clap`, and a `Params` struct whose associated function is responsible
for determining the file path parameters from the `Options`. This is
an improvement because the previous code had some logic for
determining file path parameters in one place and some in another
place.
2022-05-31 19:35:01 -04:00
Sylvestre Ledru
e276e652dc
Merge pull request #3579 from jfinkels/df-total-label-target-column
...
df: show "total" label in correct column
2022-05-31 07:42:06 +01:00
Terts Diepraam
a240b1cef3
Merge pull request #3578 from jfinkels/mktemp-usage-error-status-1
...
mktemp: exit with status 1 on usage errors
2022-05-30 18:34:27 +02:00
Jeffrey Finkelstein
d7b528f60b
df: show "total" label in correct column
...
Show the "total" label in the "source" column or in the "target"
column if the "source" column is not visible.
Before this commit,
$ df --total --output=target .
Mounted on
/
-
After this commit,
$ df --total --output=target .
Mounted on
/
total
2022-05-30 11:22:07 -04:00
Jeffrey Finkelstein
dfc1c8a2dd
mktemp: exit with status 1 on usage errors
2022-05-30 09:30:47 -04:00
Daniel Hofstetter
df2507bdf2
expand: remove empty line from error message
2022-05-30 14:31:39 +02:00
Daniel Hofstetter
6d82523a99
dircolors: implement --print-ls-colors
2022-05-30 09:11:27 +02:00
Daniel Hofstetter
2261051239
split: set names for arg values
2022-05-30 09:10:18 +02:00
Jan Scheer
767eeede34
tail: update README
...
* add summary of implemented/missing features
* add summary of gnu test suite results
2022-05-28 01:38:53 +02:00
Jan Scheer
4cb6b094f5
Merge branch 'main' into tail_notify
2022-05-27 23:44:24 +02:00
Jan Scheer
bb5dc8bd2f
tail: verify that -[nc]0 without -f, exit without reading
...
This passes: "gnu/tests/tail-2/tail-n0f.sh"
* add tests for "-[nc]0 wo -f"
* add bubble-up UResult
* rename return_code -> exit_code
2022-05-27 23:36:31 +02:00
Terts Diepraam
7861cc9dca
Merge pull request #3569 from cakebaker/overridable_args
...
dircolors: make -b & -c args overridable
2022-05-27 13:08:25 +02:00
Daniel Hofstetter
e750a5a06a
dirname: add missing "\n\" to usage message
2022-05-27 10:52:51 +02:00
Daniel Hofstetter
598fdc4430
dircolors: make -b & -c args overridable
2022-05-27 10:36:49 +02:00
Daniel Hofstetter
3a0aaabd27
tail: fix typo
2022-05-26 15:17:20 +02:00
Jan Scheer
4bbf708c81
tail: fix handling of PermissionDenied Error
...
* add tests for opening unreadable files
2022-05-26 13:00:40 +02:00
Jan Scheer
6bd9a1d537
Merge branch 'main' into tail_notify
2022-05-26 00:33:12 +02:00
Jan Scheer
5f86e238ae
tail: refactor FileHandling and fixes for new tests
...
Refactor and fixes, mostly to pass test_follow_name_move2.
2022-05-26 00:31:03 +02:00
Sylvestre Ledru
172f5c4182
Merge pull request #3504 from cakebaker/read_blocksize_from_env_vars
...
df: read block size from env vars
2022-05-25 16:41:41 +02:00
Sylvestre Ledru
fa577603c2
Merge pull request #3471 from 353fc443/mktemp-set-dir-mode
...
mktemp: change directory permission after creation
2022-05-25 14:56:45 +02:00
Sylvestre Ledru
549c642519
Merge pull request #3559 from cakebaker/update_dircolors_database
...
dircolors: update internal db
2022-05-25 13:10:28 +02:00
Daniel Hofstetter
ba746250fb
dircolors: update internal db
2022-05-24 13:56:15 +02:00
Daniel Hofstetter
c90a1c759a
df: fix rounding behavior in humanreadable mode
...
Fixes #3422
2022-05-23 15:21:51 +02:00
Daniel Hofstetter
ea284ce55e
df: read block size from env vars
2022-05-23 09:24:07 +02:00
Sylvestre Ledru
c818ca0039
Merge pull request #3551 from jfinkels/mktemp-too-few-xs-suffix
...
mktemp: include suffix in error message
2022-05-23 08:38:15 +02:00
Jan Scheer
dc4b6f2cf9
Merge branch 'main' into tail_notify
2022-05-23 01:10:32 +02:00
Jan Scheer
6a7b6ccdbe
tail: add test_follow_name_move_retry
...
* add fixes to pass test_follow_name_move_retry
* fix test_follow_name_remove
* bump notify to 5.0.0-pre.15
* adjust PollWatcher::with_delay -> PollWatcher::with_config
2022-05-23 00:51:02 +02:00
Terts Diepraam
eae07adfb1
Version 0.0.14 ( #3553 )
...
Version 0.0.14
2022-05-22 19:57:19 +02:00
Sylvestre Ledru
887f49ce2d
Merge pull request #3550 from thomasqueirozb/ls_gds
...
ls: implement --group-directories-first
2022-05-22 09:50:04 +02:00
Jeffrey Finkelstein
35fb4e6ea1
mktemp: include suffix in error message
...
Include the suffix in the error message produced by `mktemp` when
there are too few Xs in the template. Before this commit,
$ mktemp --suffix=X aXX
mktemp: too few X's in template 'aXX'
After this commit,
$ mktemp --suffix=X aXX
mktemp: too few X's in template 'aXXX'
This matches the behavior of GNU `mktemp`.
2022-05-21 21:59:06 -04:00
Thomas Queiroz
bcb9821e24
ls: take into account "." and ".." when sorting
2022-05-21 18:04:17 -03:00
Sylvestre Ledru
d92107362b
Merge pull request #3521 from jfinkels/mktemp-tmpdir-absolute-path
...
mktemp: correct error message on absolute path
2022-05-21 09:40:33 +02:00
Sylvestre Ledru
bda9f9f889
Merge pull request #3529 from ilkecan/mv-target-dir
...
mv: allow a single source with --target-directory
2022-05-21 09:40:16 +02:00
Thomas Queiroz
55a68bca80
ls: implement --group-directories-first
2022-05-21 02:55:45 -03:00
Daniel Hofstetter
af5ef5585f
df/uniq: suppress lint errors
2022-05-20 17:00:56 +02:00
Sylvestre Ledru
c517096e19
Merge pull request #3543 from jfinkels/mktemp-suffix-path-separator
...
mktemp: fix error msg when suffix has path sep.
2022-05-20 11:56:47 +02:00
Sylvestre Ledru
27ccb3df2a
Merge pull request #3501 from tertsdiepraam/kill-group-id
...
`kill`: kill process group with negative id
2022-05-20 11:53:45 +02:00
Sylvestre Ledru
9fb19c12a3
Merge pull request #3530 from cakebaker/fix_size_header_rounding
...
df: fix incorrect rounding of size header
2022-05-20 10:27:25 +02:00
Sylvestre Ledru
ae7d8aac46
Merge pull request #3539 from jfinkels/seq-usage-error
...
seq: use usage error where appropriate
2022-05-20 10:26:55 +02:00
Jan Scheer
a62f71f93e
Merge branch 'main' into tail_notify
2022-05-19 23:00:31 +02:00
Jan Scheer
84480f892d
tail: add equivalent of stdin_is_pipe_or_fifo() for Windows
...
* add support to determine if stdin is readable on Windows
2022-05-19 22:55:47 +02:00
Jeffrey Finkelstein
6260333415
mktemp: fix error msg when suffix has path sep.
...
Correct the error message when the template argument contains a path
separator in its suffix. Before this commit:
$ mktemp aXXX/b
mktemp: too few X's in template 'b'
After this commit:
$ mktemp aXXX/b
mktemp: invalid suffix '/b', contains directory separator
This error message is more appropriate and matches the behavior of GNU
mktemp.
2022-05-19 15:46:04 +02:00
Daniel Hofstetter
7374d76d63
date: set names for arg values
2022-05-19 10:44:01 +02:00
Terts Diepraam
57072dd4f9
Merge pull request #3537 from LevitatingBusinessMan/uname_pi
...
uname: hide processor and hwplatform options
2022-05-18 22:58:13 +02:00
Sylvestre Ledru
2a969de2a4
Merge branch 'main' into kill-group-id
2022-05-18 21:12:30 +02:00
Jan Scheer
6a1cf72316
Merge branch 'main' into tail_notify
2022-05-18 14:28:19 +02:00
Jan Scheer
07231e6c6c
tail: fix handling of stdin redirects for macOS
...
On macOS path.is_dir() can be false for directories
if it was a redirect, e.g. ` tail < DIR`
* fix some tests for macOS
Cleanup:
* fix clippy/spell-checker
* fix build for windows by refactoring stdin_is_pipe_or_fifo()
2022-05-18 14:22:53 +02:00
Jeffrey Finkelstein
a3e6d2b84b
seq: use usage error where appropriate
2022-05-17 21:02:42 -04:00
Jeffrey Finkelstein
8a941db20a
mktemp: correct error message on absolute path
...
Correct the error message produced by `mktemp` when `--tmpdir` is
given and the template is an absolute path:
$ mktemp --tmpdir=a /XXX
mktemp: invalid template, '/XXX'; with --tmpdir, it may not be absolute
2022-05-17 20:16:47 -04:00
LevitatingBusinessMan
cbc0381f20
uname: hide processor and hwplatform options
2022-05-17 23:57:05 +02:00
Daniel Hofstetter
27dd59635a
uucore: add InvalidSuffix to ParseSizeError
2022-05-17 15:37:49 +02:00
Jan Scheer
75a6641ced
Merge branch 'main' into tail_notify
2022-05-17 14:13:20 +02:00
353fc443 aka Seagull
124312702f
Merge branch 'main' into mktemp-set-dir-mode
2022-05-17 12:51:04 +01:00
Sylvestre Ledru
e337826a11
Merge pull request #3536 from uutils/dependabot/cargo/signal-hook-0.3.14
...
build(deps): bump signal-hook from 0.3.13 to 0.3.14
2022-05-17 12:32:49 +02:00
Sylvestre Ledru
7792af336e
Merge pull request #3535 from uutils/dependabot/cargo/libc-0.2.126
...
build(deps): bump libc from 0.2.125 to 0.2.126
2022-05-17 12:32:22 +02:00
Terts Diepraam
eac0760905
Merge pull request #3528 from jfinkels/clippy-fixes
...
all: clippy fixes
2022-05-17 11:57:47 +02:00
dependabot[bot]
8d0572a3ba
build(deps): bump signal-hook from 0.3.13 to 0.3.14
...
Bumps [signal-hook](https://github.com/vorner/signal-hook ) from 0.3.13 to 0.3.14.
- [Release notes](https://github.com/vorner/signal-hook/releases )
- [Changelog](https://github.com/vorner/signal-hook/blob/master/CHANGELOG.md )
- [Commits](https://github.com/vorner/signal-hook/compare/v0.3.13...v0.3.14 )
---
updated-dependencies:
- dependency-name: signal-hook
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-17 07:13:56 +00:00
dependabot[bot]
cd743c2fd1
build(deps): bump libc from 0.2.125 to 0.2.126
...
Bumps [libc](https://github.com/rust-lang/libc ) from 0.2.125 to 0.2.126.
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.125...0.2.126 )
---
updated-dependencies:
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-17 07:13:42 +00:00
353fc443 aka Seagull
2086d04996
Merge branch 'main' into mktemp-set-dir-mode
2022-05-17 04:58:03 +00:00
Jan Scheer
409878e323
Merge branch 'main' into tail_notify
2022-05-16 22:45:52 +02:00
Jan Scheer
90cef98a14
tail: implement follow
for stdin (pipe, fifo, and redirects)
...
* implement behavior to pass `gnu/tests/tail-2/follow-stdin.sh`
* add stdin redirect using the same /dev/stdin-workaround used by uu_stat
* refactor
2022-05-16 22:27:41 +02:00
Jan Scheer
5aee95b4e5
tail: add check to detect a closed file descriptor
...
This is WIP or even WONT-FIX because there's a workaround in Rust's
stdlib which prevents us from detecting a closed FD.
see also the discussion at:
https://github.com/uutils/coreutils/issues/2873
2022-05-16 22:10:27 +02:00
353fc443
2383950403
mktemp: Added tests for checking directory permissions
2022-05-16 18:05:59 +00:00
dependabot[bot]
9090457f02
build(deps): bump lscolors from 0.9.0 to 0.10.0
...
Bumps [lscolors](https://github.com/sharkdp/lscolors ) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/sharkdp/lscolors/releases )
- [Commits](https://github.com/sharkdp/lscolors/compare/v0.9.0...v0.10.0 )
---
updated-dependencies:
- dependency-name: lscolors
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-16 07:01:00 +00:00
Daniel Hofstetter
576aafb00f
df: fix incorrect rounding of size header
2022-05-15 16:25:17 +02:00
Sylvestre Ledru
40095e1b50
Merge pull request #3438 from jfinkels/chown-nonexistent-user-id
...
chown: allow setting arbitrary numeric user ID
2022-05-14 09:20:01 +02:00
Sylvestre Ledru
0a7ff713e0
Merge pull request #3524 from tertsdiepraam/clap-value-hints
...
Clap value hints
2022-05-14 09:18:04 +02:00
ilkecan
530d5f6dbf
mv: allow a single source with --target-directory
2022-05-14 03:00:29 +00:00
Jeffrey Finkelstein
896bbec760
all: clippy fixes
2022-05-13 22:47:56 -04:00
Daniel Hofstetter
996a84cb6f
df: round up values if block size is specified
...
Fixes #3479
2022-05-13 16:43:28 +02:00
Terts Diepraam
0acfa07d77
all: add value hints
2022-05-13 16:15:50 +02:00
Terts Diepraam
369026a92f
tr: remove duplicate line from clap::Command
2022-05-12 22:34:08 +02:00
dependabot[bot]
d34a4190df
build(deps): bump rust-ini from 0.17.0 to 0.18.0
...
Bumps [rust-ini](https://github.com/zonyitoo/rust-ini ) from 0.17.0 to 0.18.0.
- [Release notes](https://github.com/zonyitoo/rust-ini/releases )
- [Commits](https://github.com/zonyitoo/rust-ini/compare/v0.17.0...v0.18.0 )
---
updated-dependencies:
- dependency-name: rust-ini
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-12 09:09:11 +02:00
Jeffrey Finkelstein
3029d83a36
Revert "WIP Trying to diagnose 'invalid group: 1001:121' error in CI environment"
...
This reverts commit 291fb3ad71a0e93705509a352fd95de7539402ed.
2022-05-12 08:41:17 +02:00
Jeffrey Finkelstein
f56903493c
WIP Trying to diagnose 'invalid group: 1001:121' error in CI environment
2022-05-12 08:41:17 +02:00
Jeffrey Finkelstein
163df8abc1
fixup! chown: allow setting arbitrary numeric user ID
2022-05-12 08:41:17 +02:00
Jeffrey Finkelstein
55550e1a6e
chown: allow setting arbitrary numeric user ID
...
Update `chown` to allow setting the owner of a file to a numeric user
ID regardless of whether a corresponding username exists on the
system.
For example,
$ touch f && sudo chown 12345 f
succeeds even though there is no named user with ID 12345.
Fixes #3380 .
2022-05-12 08:41:17 +02:00
Sylvestre Ledru
6a9a7d76fc
Merge pull request #3498 from jhscheer/fix_stat_redirect
...
stat: improve handling of stdin/fifo (fix #3485 )
2022-05-12 08:35:43 +02:00
Sylvestre Ledru
1ca4cf5ea7
Merge pull request #3512 from jfinkels/mktemp-invalid-template-path-sep
...
mktemp: error on path separator in template prefix
2022-05-12 08:34:50 +02:00
Sylvestre Ledru
c212f4a556
Merge pull request #3513 from cakebaker/portability_headers
...
df: implement POSIX conform header line
2022-05-12 08:33:50 +02:00
Daniel Hofstetter
a6b100a5ca
df: show error if provided block size is zero
2022-05-11 12:59:51 +02:00
Daniel Hofstetter
e26fed61b3
df: implement POSIX conform header line
...
It also fixes #3195
2022-05-11 12:59:47 +02:00
Jeffrey Finkelstein
2874f18950
mktemp: error on path separator in template prefix
...
Correct the error that arises from a path separator in the prefix
portion of a template argument provided to `mktemp`. Before this
commit, the error message was incorrect:
$ mktemp -t a/bXXX
mktemp: failed to create file via template 'a/bXXX': No such file or directory (os error 2) at path "/tmp/a/bege"
After this commit, the error message is correct:
$ mktemp -t a/bXXX
mktemp: invalid template, 'a/bXXX', contains directory separator
The code was failing to check for a path separator in the prefix
portion of the template.
2022-05-11 12:59:44 +02:00
Terts Diepraam
53c3efecd8
kill: remove table_old arg in favor of a short alias
2022-05-11 12:59:29 +02:00
Terts Diepraam
a7cf757127
kill: kill process group with negative id
2022-05-11 12:59:29 +02:00
Terts Diepraam
e1d50dae87
kill: fix typo
2022-05-11 12:59:29 +02:00
Jan Scheer
d906f09e6e
stat: improve handling of stdin/fifo ( fix #3485 )
...
* fix https://github.com/uutils/coreutils/issues/3485
* improve the workaround from #3280
* add tests
2022-05-11 12:59:25 +02:00
Sylvestre Ledru
25ecb81c7f
Merge branch 'main' into mktemp-set-dir-mode
2022-05-11 12:59:05 +02:00
jfinkels
ae580cd54a
Merge pull request #3482 from cakebaker/handle_posixly_correct
...
df: use blocksize of 512 if POSIXLY_CORRECT is set
2022-05-09 19:43:58 -04:00
Sylvestre Ledru
f65d72e334
also support for tests/touch/relative.sh
2022-05-08 21:52:12 +02:00
Sylvestre Ledru
d5569847bd
also support for tests/touch/no-rights.sh format
2022-05-08 21:50:12 +02:00
Daniel Hofstetter
f668b69a2c
df: use blocksize of 512 if POSIXLY_CORRECT is set
2022-05-08 14:46:31 +02:00
Sylvestre Ledru
56264ebece
Merge branch 'main' into 2884-time-0.3
2022-05-07 20:57:14 +02:00
Daniel Hofstetter
5a3933a882
df: fix "Size" header for multiples of 1000 & 1024
2022-05-06 15:37:52 +02:00
Terts Diepraam
122c7d6d5b
Merge pull request #3490 from cakebaker/fix_help_output
...
df: set names for arg values & add missing space
2022-05-06 11:38:34 +02:00
Sylvestre Ledru
06ef89b3d8
touch: improve the -d option support of other dates
2022-05-06 09:23:46 +02:00
Sylvestre Ledru
a60f6dc67e
Update num-traits for real
2022-05-06 08:38:10 +02:00
dependabot[bot]
97c59d7857
build(deps): bump num-traits from 0.2.14 to 0.2.15
...
Bumps [num-traits](https://github.com/rust-num/num-traits ) from 0.2.14 to 0.2.15.
- [Release notes](https://github.com/rust-num/num-traits/releases )
- [Changelog](https://github.com/rust-num/num-traits/blob/master/RELEASES.md )
- [Commits](https://github.com/rust-num/num-traits/compare/num-traits-0.2.14...num-traits-0.2.15 )
---
updated-dependencies:
- dependency-name: num-traits
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-06 08:38:10 +02:00
Sylvestre Ledru
8e8203ebdb
Merge pull request #3487 from jfinkels/mktemp-simpler-error
...
mktemp: return MkTempError from parse_template()
2022-05-06 08:35:54 +02:00
Daniel Hofstetter
be1f41e24c
df: set names for arg values & add missing space
2022-05-06 08:02:22 +02:00
Terts Diepraam
a711597619
Merge pull request #3481 from cakebaker/refactor_tests_in_table_rs
...
df: implement Default for Row for unit tests
2022-05-06 00:15:33 +02:00
Jeffrey Finkelstein
e691330f02
mktemp: return MkTempError from parse_template()
...
Change the return type of the `parse_template()` helper function in
the `mktemp` program so that it returns `Result<..., MkTempError>`
instead of `UResult<...>`. This separates the lower level helper
function from the higher level `UResult` abstraction and will make it
easier to refactor this code in future commits.
2022-05-05 17:58:37 -04:00
Sylvestre Ledru
65d0f5ba9f
to_local: manage the error
2022-05-05 22:56:11 +02:00
Sylvestre Ledru
e70b99dad0
touch: add support of -d '1970-01-01 18:43:33.023456789'
2022-05-05 22:56:10 +02:00
Sylvestre Ledru
309347e218
Merge pull request #3478 from uutils/dependabot/cargo/xattr-0.2.3
...
build(deps): bump xattr from 0.2.2 to 0.2.3
2022-05-05 22:37:05 +02:00
Terts Diepraam
6e7abb3320
Merge pull request #3430 from cakebaker/human_readable
...
df: extract HumanReadable from BlockSize
2022-05-05 12:43:59 +02:00
Sylvestre Ledru
75ea1f1fc3
Merge pull request #3457 from tertsdiepraam/clap-exit-code
...
`clap` exit code
2022-05-05 11:44:24 +02:00
Daniel Hofstetter
00a3ec2d1f
df: implement Default for Row for unit tests
2022-05-05 09:37:40 +02:00
Daniel Hofstetter
46e029f34c
df: refactor HumanReadable handling
...
The refactoring consists of three parts:
1) Introduction of SizeFormat & HumanReadable enums
2) Addition of a size_format field to the options struct
3) Movement of header logic from BlockSize to Header
2022-05-05 09:37:17 +02:00
Sylvestre Ledru
e06fe3c8f8
Merge pull request #3480 from cakebaker/set_min_width_for_used_column
...
df: set min width of "Used" column to 5
2022-05-05 07:59:45 +02:00
Sylvestre Ledru
84f24aed8f
Merge pull request #3476 from ackerleytng/main
...
du: use USimpleError instead of set_exit_code
2022-05-05 07:59:20 +02:00
Sylvestre Ledru
cbe39b4154
Merge pull request #3456 from cakebaker/ticket_3193
...
df: fix "Size" column header
2022-05-05 07:58:48 +02:00
Terts Diepraam
c7b7f19559
cp: use new clap error mechanism
2022-05-04 21:32:14 +02:00
Terts Diepraam
2409726258
base: set exit code to 1 for clap errors
2022-05-04 21:32:14 +02:00
Terts Diepraam
1bb85acc71
nice: set exit code for clap errors to 125
2022-05-04 21:32:14 +02:00
Terts Diepraam
8df253da69
cat: set exit code for invalid arguments to 1 instead of 2
2022-05-04 21:32:14 +02:00
Ackerley Tng
88a62c4922
du: use common error methods with show! instead of set_exit_code
2022-05-04 07:33:19 -07:00
Daniel Hofstetter
9bd883169d
df: set min width of "Used" column to 5
2022-05-04 09:37:09 +02:00
dependabot[bot]
3e30569c2f
build(deps): bump xattr from 0.2.2 to 0.2.3
...
Bumps [xattr](https://github.com/Stebalien/xattr ) from 0.2.2 to 0.2.3.
- [Release notes](https://github.com/Stebalien/xattr/releases )
- [Commits](https://github.com/Stebalien/xattr/commits )
---
updated-dependencies:
- dependency-name: xattr
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-04 06:13:02 +00:00
anastygnome
badf947f8a
Do not dereference symlink even when dangling ( fix #3364 )
...
Fixes an issue with cp not copying symlinks in spite of the -P (no dereference option)
Fix issue #3364
Performance improvements
Avoid useless read from metadata and reuse previous dest information
Signed-off-by: anastygnome <noreplygit@protonmail.com>
2022-05-03 19:53:23 +02:00
Daniel Hofstetter
15412f100a
df: show "block-size argument too large" error
2022-05-03 09:26:57 +02:00
Sylvestre Ledru
0b9d703da8
Merge branch 'main' into 2884-time-0.3
2022-05-02 21:21:45 +02:00
Sylvestre Ledru
8353b06526
Merge pull request #3472 from uutils/dependabot/cargo/memchr-2.5.0
...
build(deps): bump memchr from 2.4.1 to 2.5.0
2022-05-02 21:03:13 +02:00
Sylvestre Ledru
9b69e6fd47
Merge branch 'main' into 2884-time-0.3
2022-05-02 18:14:14 +02:00
dependabot[bot]
a1e5f8e53f
build(deps): bump memchr from 2.4.1 to 2.5.0
...
Bumps [memchr](https://github.com/BurntSushi/memchr ) from 2.4.1 to 2.5.0.
- [Release notes](https://github.com/BurntSushi/memchr/releases )
- [Commits](https://github.com/BurntSushi/memchr/compare/2.4.1...2.5.0 )
---
updated-dependencies:
- dependency-name: memchr
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 13:03:18 +00:00
Sylvestre Ledru
1c124fa6ed
Merge pull request #3468 from uutils/dependabot/cargo/libc-0.2.125
...
build(deps): bump libc from 0.2.124 to 0.2.125
2022-05-02 15:01:17 +02:00
353fc443 aka Seagull
3f942cddf5
Merge branch 'main' into mktemp-set-dir-mode
2022-05-02 10:24:03 +03:00
353fc443
87c2122e76
mktemp: change directory permission after creation
2022-05-02 07:20:29 +00:00
Sylvestre Ledru
fe7829d2f9
Merge pull request #3455 from mike-kfed/ptx_breakfile
...
ptx: implement breakfile option
2022-05-02 08:39:14 +02:00
dependabot[bot]
de6aa6de9b
build(deps): bump libc from 0.2.124 to 0.2.125
...
Bumps [libc](https://github.com/rust-lang/libc ) from 0.2.124 to 0.2.125.
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.124...0.2.125 )
---
updated-dependencies:
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 06:36:41 +00:00
Sylvestre Ledru
3078ca8346
Add CHARCLASS to the spell ignore
2022-05-01 20:18:33 +02:00
Jeffrey Finkelstein
aa6aefbd64
mktemp: respect path given in template argument
...
Fix a bug in `mktemp` where it was not respecting the path given by
the positional argument. Previously, it would place the temporary file
whose name is induced by a given template in the `/tmp` directory,
like this:
$ mktemp XXX
/tmp/LJr
$ mktemp d/XXX
/tmp/d/IhS
After this commit, it respects the directory given in the template
argument:
$ mktemp XXX
LJr
$ mktemp d/XXX
d/IhS
Fixes #3440 .
2022-05-01 13:03:18 -04:00
Sylvestre Ledru
9d81d6fef2
touch: add support of -d '1970-01-01 18:43:33.023456789'
2022-05-01 17:01:22 +02:00
Sylvestre Ledru
31c28eeaa9
fix gnu/tests/touch/60-seconds
2022-05-01 17:01:22 +02:00
Sylvestre Ledru
2b11d77395
time: Improve the l&f
2022-05-01 17:01:13 +02:00
Sylvestre Ledru
c009e1bed8
workaround the tests/touch/60-seconds test to skip leap second
2022-05-01 17:00:41 +02:00
Sylvestre Ledru
3a576f2441
time: Various fixes
2022-05-01 17:00:35 +02:00
Sylvestre Ledru
ca670148f2
build(deps): bump time from 0.1.43 to 0.3.9
...
Bumps [time](https://github.com/time-rs/time ) from 0.1.43 to 0.3.9.
- [Release notes](https://github.com/time-rs/time/releases )
- [Changelog](https://github.com/time-rs/time/blob/main/CHANGELOG.md )
- [Commits](https://github.com/time-rs/time/compare/v0.1.43...v0.3.9 )
---
updated-dependencies:
- dependency-name: time
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-01 16:58:47 +02:00
Jan Scheer
90a0226844
tail: improve support for polling
...
* Fix a timing related bug with polling (---disable-inotify) where some
Events weren't delivered fast enough by `Notify::PollWatcher` to pass all
of tests/tail-2/retry.sh and test_tail::{test_retry4, retry7}.
* uu_tail now reverts to polling automatically if inotify backend reports
too many open files (this mimics the behavior of GNU's tail).
2022-04-30 12:02:42 +02:00
Michael Kefeder
83a64f4afe
ptx: escape regular expression character class special chars
2022-04-30 10:01:11 +02:00
Daniel Hofstetter
023fc96aab
df: fix "Size" column header
...
Fixes #3193
2022-04-30 07:33:00 +02:00
Michael Kefeder
4889128ede
ptx: add documentation to read_char_filter_file function
2022-04-29 10:57:36 +02:00
Sylvestre Ledru
f03c069289
Merge pull request #3450 from uutils/dependabot/cargo/retain_mut-0.1.7
...
build(deps): bump retain_mut from 0.1.2 to 0.1.7
2022-04-29 10:50:45 +02:00
Michael Kefeder
b0567670d1
ptx: implement breakfile option
2022-04-28 16:51:06 +02:00
Sylvestre Ledru
bf3a86f654
Merge pull request #3451 from ndd7xv/help-discrepancies
...
fix -h and --help discrepancies
2022-04-28 08:19:41 +02:00
ndd7xv
88752ecc3e
fix -h and --help discrepancies
...
addresses https://github.com/uutils/coreutils/issues/3370
2022-04-27 23:16:36 -04:00
dependabot[bot]
38a8fa6a77
build(deps): bump retain_mut from 0.1.2 to 0.1.7
...
Bumps [retain_mut](https://github.com/upsuper/retain_mut ) from 0.1.2 to 0.1.7.
- [Release notes](https://github.com/upsuper/retain_mut/releases )
- [Commits](https://github.com/upsuper/retain_mut/commits )
---
updated-dependencies:
- dependency-name: retain_mut
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-27 06:44:04 +00:00
dependabot[bot]
3cee681e82
build(deps): bump libc from 0.2.121 to 0.2.124
...
Bumps [libc](https://github.com/rust-lang/libc ) from 0.2.121 to 0.2.124.
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.121...0.2.124 )
---
updated-dependencies:
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-26 11:23:42 +02:00
Sylvestre Ledru
641435d1dc
Merge pull request #3433 from uutils/dependabot/cargo/strum_macros-0.24.0
...
build(deps): bump strum_macros from 0.23.1 to 0.24.0
2022-04-25 23:08:35 +02:00
dependabot[bot]
681f5c88e2
build(deps): bump strum_macros from 0.23.1 to 0.24.0
...
Bumps [strum_macros](https://github.com/Peternator7/strum ) from 0.23.1 to 0.24.0.
- [Release notes](https://github.com/Peternator7/strum/releases )
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Peternator7/strum/commits )
---
updated-dependencies:
- dependency-name: strum_macros
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 08:13:59 +02:00
Ryan Zoeller
363a2a5611
Upgrade nix to 0.24.1, ctrlc to 3.2.2
...
Limit nix features, which should help compile times slightly.
Replace usage of deprecated nix functionality with std equivalent.
2022-04-25 08:13:20 +02:00
Sylvestre Ledru
181ebd3996
Revert "df: remove trailing spaces in rightmost column"
2022-04-24 20:39:39 +02:00
Daniel Hofstetter
0f13de4e1a
df: allow sizes with a suffix for --block-size
...
Fixes #3416
2022-04-24 15:37:23 +02:00
Jan Scheer
5331a10a7b
tail: update README
2022-04-24 15:09:28 +02:00
Sylvestre Ledru
5088ddc377
Merge pull request #3408 from cakebaker/ticket_3325
...
df: respect -t arg when specific file is provided
2022-04-23 09:24:08 +02:00
Terts Diepraam
a03e9c7d8b
Merge pull request #3432 from cakebaker/remove_unreachable_code
...
df: remove unreachable code
2022-04-23 01:03:06 +02:00
Jan Scheer
6e1e3ac012
Merge branch 'main' into tail_notify
2022-04-23 00:26:59 +02:00
Jan Scheer
ceb2e993c0
tail: update readmes
2022-04-23 00:26:22 +02:00
Sylvestre Ledru
48a521224e
Merge pull request #3396 from jtracey/android2
...
fix Android support
2022-04-22 16:06:12 +02:00
Daniel Hofstetter
2d4552cce4
df: respect -t arg when specific file is provided
...
Fixes #3325
2022-04-22 10:27:25 +02:00
Jan Scheer
132cab15d2
tail: update notify crate
...
notify-crate:
Switch from latest release to latest commit on main branch
in order to fix the builds on FreeBSD/macOS.
https://github.com/notify-rs/notify/pull/399
2022-04-22 09:54:21 +02:00
Jan Scheer
6c096267bf
Merge branch 'main' into tail_notify
2022-04-21 23:55:54 +02:00
Jan Scheer
4a56d2916d
tail: fix handling of -f
with non regular files
...
This makes uu_tail pass the "gnu/tests/tail-2/inotify-only-regular" test
again by adding support for charater devices.
test_tail:
* add test_follow_inotify_only_regular
* add clippy fixes for windows
2022-04-21 22:52:17 +02:00
Sylvestre Ledru
f684162e21
Merge pull request #3403 from uutils/dependabot/cargo/remove_dir_all-0.7.0
...
build(deps): bump remove_dir_all from 0.5.3 to 0.7.0
2022-04-21 21:32:23 +02:00
Daniel Hofstetter
8d1e340d80
df: remove unreachable code
2022-04-21 15:24:52 +02:00
Terts Diepraam
e8574ca184
Merge pull request #3418 from cakebaker/ticket_3409
...
df: show error if all types are excluded
2022-04-20 23:51:36 +02:00
Sylvestre Ledru
4ed3bbe705
Merge pull request #3423 from cakebaker/remove_trailing_spaces_in_rightmost_column
...
df: remove trailing spaces in rightmost column
2022-04-20 11:42:27 +02:00
Sylvestre Ledru
f6dafbc950
Merge pull request #3429 from cakebaker/ticket_3425
...
df: fix "File" column width for unicode filenames
2022-04-20 10:50:07 +02:00
Justin Tracey
1f025c19af
address libc weirdness on 32 bit android
2022-04-20 08:44:49 +02:00
Justin Tracey
2a0d58d060
get android builds to compile and pass tests
2022-04-20 08:44:49 +02:00
Justin Tracey
5e7d58650d
fix null pointer derefs
...
The code for creating a Passwd from the fields of the raw syscall result
assumed that the syscall would return valid C strings in all non-error
cases. This is not true, and at least one platform (Android) will
populate the fields with null pointers where they are not supported.
To fix this and prevent the error from happening again, this commit
changes `cstr2string(ptr)` to check for a null pointer, and return an
`Option<String>`, with `None` being the null pointer case. While
arguably it should be the caller's job to check for a null pointer
before calling (since the safety precondition is that the pointer is to
a valid C string), relying on the type checker to force remembering this
edge case is safer in the long run.
2022-04-20 08:44:49 +02:00
Jan Scheer
7228902e55
Merge branch 'main' into tail_notify
2022-04-19 22:25:35 +02:00
Jan Scheer
eb21330ade
Merge branch 'main' into tail_notify
2022-04-19 22:14:55 +02:00
Terts Diepraam
cce2eebf98
Merge pull request #3420 from sylvestre/install-verbose
...
install: verbose - list all created directories
2022-04-19 18:56:57 +02:00
Daniel Hofstetter
9de407b1f0
df: fix "File" column width for unicode filenames
...
Fixes #3425
2022-04-19 11:09:46 +02:00
Daniel Hofstetter
cc4b28780b
df: show error if all types are excluded
...
Fixes #3409
2022-04-19 09:10:37 +02:00
Daniel Hofstetter
576ec49fa5
df: remove trailing spaces in rightmost column
2022-04-19 08:13:35 +02:00
Sylvestre Ledru
d7cf3e7483
Merge pull request #3414 from gmnsii/main
...
df: -h -H shouldn't cause an error #3366
2022-04-18 22:24:36 +02:00
Sylvestre Ledru
7910eca71b
install: verbose - list all created directories
...
$ install -Dv source_file1 sub3/a/b/c/file
install: creating directory 'sub3'
install: creating directory 'sub3/a'
install: creating directory 'sub3/a/b'
install: creating directory 'sub3/a/b/c'
'source_file1' -> 'sub3/a/b/c/file'
2022-04-18 22:06:02 +02:00
Sylvestre Ledru
ee50f408bd
Merge pull request #3419 from sylvestre/install-strip
...
install: When install --strip-program=foor fails, remove the target file
2022-04-18 19:29:26 +02:00
Terts Diepraam
ae24ca45f1
Merge pull request #3386 from cakebaker/ticket_3194
...
df: fix incorrect whitespace between columns
2022-04-18 11:13:33 +02:00
Sylvestre Ledru
6da73e6a6d
install: When install --strip-program=foor fails, remove the target file
...
Should fix:
tests/install/strip-program.sh
2022-04-17 22:24:44 +02:00
Terts Diepraam
487c874204
uniq: print warning when both -D
and -c
are passed
2022-04-17 16:32:01 +02:00
Daniel Hofstetter
a052855061
df: fix incorrect whitespace between columns
...
Fixes #3194
2022-04-17 14:00:52 +02:00
gmnsii
c9bf31f97e
Args override themselves and conflicting arguments
2022-04-17 01:52:05 -07:00
gmnsii
85d113ab79
df: -h -H shouldn't cause an error #3366
2022-04-16 07:51:24 -07:00
Daniel Hofstetter
6664525449
df: remove obsolete "show_listed_fs" options field
2022-04-16 15:31:38 +02:00
gmnsii
c2e214bd99
Add dir and vdir utils (based on ls)
...
Fix issue #3163
They are basically ls with some different options.
2022-04-15 17:30:40 +02:00
dependabot[bot]
fae0065276
build(deps): bump remove_dir_all from 0.5.3 to 0.7.0
...
Bumps [remove_dir_all](https://github.com/XAMPPRocky/remove_dir_all ) from 0.5.3 to 0.7.0.
- [Release notes](https://github.com/XAMPPRocky/remove_dir_all/releases )
- [Changelog](https://github.com/XAMPPRocky/remove_dir_all/blob/master/CHANGELOG.md )
- [Commits](https://github.com/XAMPPRocky/remove_dir_all/compare/remove_dir_all@0.5.3...v0.7.0 )
---
updated-dependencies:
- dependency-name: remove_dir_all
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-14 11:14:49 +00:00
Daniel Hofstetter
a5477960a5
df: show error if specified type doesn't exist
...
Fixes #3252 . As a side effect, "df -H -total" will now fail, too, as
expected.
2022-04-14 10:39:48 +02:00
Sylvestre Ledru
7967017086
Merge pull request #3358 from uutils/dependabot/cargo/nom-7.1.1
...
build(deps): bump nom from 7.1.0 to 7.1.1
2022-04-13 23:21:38 +02:00
dependabot[bot]
a644233ea2
build(deps): bump regex from 1.5.4 to 1.5.5
...
Bumps [regex](https://github.com/rust-lang/regex ) from 1.5.4 to 1.5.5.
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.5.4...1.5.5 )
---
updated-dependencies:
- dependency-name: regex
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-13 15:17:42 +02:00
dependabot[bot]
29fcb8653b
build(deps): bump nom from 7.1.0 to 7.1.1
...
Bumps [nom](https://github.com/Geal/nom ) from 7.1.0 to 7.1.1.
- [Release notes](https://github.com/Geal/nom/releases )
- [Changelog](https://github.com/Geal/nom/blob/main/CHANGELOG.md )
- [Commits](https://github.com/Geal/nom/compare/7.1.0...7.1.1 )
---
updated-dependencies:
- dependency-name: nom
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-13 15:11:54 +02:00
Sylvestre Ledru
c23118bab4
Merge pull request #3387 from cakebaker/ticket_3355
...
df: fix calculation of IUse%
2022-04-13 15:11:41 +02:00
Sylvestre Ledru
10be79c095
Merge pull request #3150 from pyoky/mkdir-fix
...
mkdir: fixed not respecting set umask
2022-04-13 12:00:56 +02:00
Daniel Hofstetter
56e8dda606
df: fix calculation of IUse%
...
Fixes #3355
2022-04-13 11:19:24 +02:00
Sylvestre Ledru
4afe0a77aa
mkdir.rs: Fix a clippy warning on clippy::ptr-arg
...
```
error: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do
--> src\uu\mkdir\src/mkdir.rs:72:33
|
72 | fn strip_minus_from_mode(_args: &mut Vec<String>) -> bool {
| ^^^^^^^^^^^^^^^^ help: change this to: `&mut [String]`
|
= note: `-D clippy::ptr-arg` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
```
2022-04-13 10:47:32 +02:00
Sylvestre Ledru
92f01a79dd
Clippy on Windows: also ignore the self warning
2022-04-13 09:28:26 +02:00
Sylvestre Ledru
8cd359c556
Merge pull request #3392 from sylvestre/mv-itself
...
mv: trigger an error when doing mv dir1 dir2 dir2
2022-04-13 09:16:24 +02:00
Sylvestre Ledru
07be7a0ceb
Merge pull request #3388 from cakebaker/return_unnecessarily_wrapped_by_result
...
df: remove unnecessary return of Result
2022-04-12 22:52:31 +02:00
Sylvestre Ledru
920633c0ea
mv: trigger an error when doing mv dir1 dir2 dir2
2022-04-12 22:37:38 +02:00
Sylvestre Ledru
0f59af22d5
Merge pull request #3383 from sudosmile/main
...
mv: add OverwriteMode match in specific case
2022-04-12 20:28:07 +02:00
Daniel Hofstetter
07317f3d9f
df: remove unnecessary return of Result
2022-04-12 16:40:48 +02:00
Daniel Hofstetter
d2289d268a
df: fix too low values in I* columns
...
Fixes #3349
2022-04-12 10:19:41 +02:00
Ashe Leclerc
1d76c96570
mv: add OverwriteMode match in specific case
...
Check OverwriteMode and act depending on its value, specifically in the
the case of overwriting a non-directory with a directory(#3337 )
2022-04-12 09:28:11 +02:00
Sylvestre Ledru
f114d63b4e
Merge pull request #3376 from jfinkels/df-error-on-nonexistent-files
...
df: show error when file argument does not exist
2022-04-12 09:27:59 +02:00
Terts Diepraam
af32f7a117
Dont use from_*
method names that take self
...
This was reported as an error in Clippy 1.60.
2022-04-11 22:50:36 +02:00
Sylvestre Ledru
8b719a8591
du: add support for --exclude and --exclude-from ( #3381 )
...
* du: add support for --exclude and --exclude-from
And add an option --verbose (doesn't exist in GNU)
2022-04-11 22:50:01 +02:00
Jeffrey Finkelstein
460bd67050
df: show error when file argument does not exist
...
For example:
$ df not-a-file
df: not-a-file: No such file or directory
Fixes #3373 .
2022-04-10 22:22:18 -04:00
Sylvestre Ledru
a2cefd9b52
du: Return non zero error code when dealing with permissions errors
...
Nd make the tests/du/no-x.sh & long-sloop.sh pass
2022-04-10 01:47:39 +02:00
Sylvestre Ledru
d0aa9a9927
Merge pull request #3343 from uutils/dependabot/cargo/lscolors-0.9.0
...
build(deps): bump lscolors from 0.7.1 to 0.9.0
2022-04-09 09:29:25 +02:00
Sylvestre Ledru
53baecab49
Merge pull request #3280 from crazystylus/stat-fails-to-read-a-file-redirected-to-stdin
...
`stat`: Adds support to read a filename redirected to stdin
2022-04-09 09:11:48 +02:00
Sylvestre Ledru
935bdd4210
Merge pull request #3368 from tertsdiepraam/msrv-1.56
...
Rust Edition 2021
2022-04-07 11:46:42 +02:00
Kai Lüke
e894e40c56
hashsum: add --no-names option from official b3sum tool ( #3361 )
...
* hashsum: add --no-names option from official b3sum tool
The official b3sum tool has a --no-names option for only printing the
hashes, omitting the filenames. This is quite handy when used from
scripts because it spares the postprocessing with "cut" or "awk".
Since the installed b3sum symlink would also serve as a drop-in for the
official tool, the --no-names option is expected to exist for
compatibility.
Add a --no-names option not only for b3sum but for hashsum in general
(and maybe GNU coreutils will also feel inspired to add this option).
Closes https://github.com/uutils/coreutils/issues/3360
2022-04-06 09:09:37 +02:00
Jan Scheer
a9fa94824d
tail: switch from Notify 5.0.0-pre.13 to 5.0.0-pre.14
2022-04-05 22:19:25 +02:00
Daniel Hofstetter
876924f5d5
df: show error if same type is included & excluded
...
Fixes #3302
2022-04-05 14:21:32 +02:00
Terts Diepraam
18369dc0be
all: use array intoiterator
2022-04-05 10:39:31 +02:00
Terts Diepraam
c6c936f529
all: remove explicit imports of TryFrom and TryInto
...
This is enabled by the changing the edition from 2018 to 2021
2022-04-05 10:39:31 +02:00
Terts Diepraam
af9f718936
Change edition to 2021
2022-04-05 10:39:31 +02:00
Sylvestre Ledru
5fbef7743b
Merge pull request #3367 from sylvestre/tty
...
tty: should not return 2 when --help is used
2022-04-05 08:02:28 +02:00
Sylvestre Ledru
cf722d7f0c
tty: should not return 2 when --help is used
...
This is impacting
gnu/tests/misc/usage_vs_getopt.sh
2022-04-04 22:55:36 +02:00
ndd7xv
298f73f778
env: add program signal messages
2022-04-03 20:01:12 +02:00
Sylvestre Ledru
a219d9e355
Merge pull request #3353 from sylvestre/install
...
install: support of `-d dir/.` to match GNU's
2022-04-03 19:31:48 +02:00
Sylvestre Ledru
3236daabf2
Merge pull request #3356 from sylvestre/rm
...
rm: rename none by --interactive=never to fix ../gnu/tests/rm/i-never.sh
2022-04-03 19:31:17 +02:00
Sylvestre Ledru
c00a277448
mkdir: also use the dir_strip_dot_for_creation function
2022-04-03 16:47:06 +02:00
Sylvestre Ledru
845b2294e1
create a function dir_strip_dot_for_creation to manage the /. issue
2022-04-03 16:47:06 +02:00
Sylvestre Ledru
2628f3ed60
install: support of -d dir/.
to match GNU's
2022-04-03 16:47:06 +02:00
Sylvestre Ledru
02cc67c915
rm: rename none by --interactive=never to fix ../gnu/tests/rm/i-never.sh
2022-04-03 09:15:45 +02:00
dependabot[bot]
ee515b57c3
build(deps): bump lscolors from 0.7.1 to 0.9.0
...
Bumps [lscolors](https://github.com/sharkdp/lscolors ) from 0.7.1 to 0.9.0.
- [Release notes](https://github.com/sharkdp/lscolors/releases )
- [Commits](https://github.com/sharkdp/lscolors/compare/v0.7.1...v0.9.0 )
---
updated-dependencies:
- dependency-name: lscolors
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-02 21:47:15 +02:00
dependabot[bot]
e82ef6966e
build(deps): bump exacl from 0.6.0 to 0.8.0
...
Bumps [exacl](https://github.com/byllyfish/exacl ) from 0.6.0 to 0.8.0.
- [Release notes](https://github.com/byllyfish/exacl/releases )
- [Changelog](https://github.com/byllyfish/exacl/blob/main/CHANGELOG.md )
- [Commits](https://github.com/byllyfish/exacl/compare/v0.6.0...v0.8.0 )
---
updated-dependencies:
- dependency-name: exacl
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-02 21:46:57 +02:00
Terts Diepraam
0fc667730d
join: fix workaround for IntErrorKind
...
In Rust versions before 1.55, there was no enum for parse errors. With the bump of the MSRV to 1.56 we can simplify this.
2022-04-02 15:18:34 +02:00
Terts Diepraam
b7809bd889
version 0.0.13
2022-04-02 11:04:27 +02:00
Sylvestre Ledru
ef8921044b
Merge pull request #3347 from cakebaker/fix_total_use_percentage
...
df: fix calculation of Use% in "total" row
2022-04-02 09:53:08 +02:00
Terts Diepraam
f00ec12e4f
Merge pull request #3345 from DevSabb/presume-input-pipe
...
head, tail: include presume-input-pipe parameter
2022-04-01 21:43:47 +02:00
DevSabb
1eee2194a3
head, tail: include presume-input-pipe parameter
2022-04-01 11:55:33 +02:00
Sylvestre Ledru
b3d87b088d
ln: adjust the error messages
2022-04-01 09:25:35 +02:00
Daniel Hofstetter
bf69c63e09
df: Fix calculation of Use% in "total" row
...
Change formula from: "Used/Size * 100" to "Used/(Used + Avail) * 100".
This formula also works if "Used" and "Avail" do not add up to "Size",
which is the case if there are reserved disk blocks.
2022-04-01 08:25:30 +02:00
Sylvestre Ledru
676283ce93
ln: implement fixes for tests/ln/backup-1.sh
...
When doing
ln b b~
ln -f --b=simple a b
First, we create a backup of b
Then, we force the override of a => b but we make sure that the backup is
done.
So, we had a bug in the ordering of the actions.
we were first removing b. Therefore, losing the capability to do a backup of this.
2022-03-31 23:39:42 +02:00
Sylvestre Ledru
e553241750
ln: rustfmt the recent changes
2022-03-31 23:39:42 +02:00
Sylvestre Ledru
526370f922
ln: use the quote method instead of doing it by hand
2022-03-31 23:39:42 +02:00
Sylvestre Ledru
15ef76fcbf
ln: when we get a failed to link, show which files
2022-03-31 23:39:42 +02:00
Terts Diepraam
5a49813e07
Merge pull request #3341 from uutils/dependabot/cargo/blake2b_simd-1.0.0
...
build(deps): bump blake2b_simd from 0.5.11 to 1.0.0
2022-03-31 13:05:43 +02:00
Terts Diepraam
7203340917
Merge pull request #3237 from uutils/dependabot/cargo/ioctl-sys-0.8.0
...
build(deps): bump ioctl-sys from 0.6.0 to 0.8.0
2022-03-31 01:09:22 +02:00
dependabot[bot]
3e7d1a265a
build(deps): bump blake2b_simd from 0.5.11 to 1.0.0
...
Bumps [blake2b_simd](https://github.com/oconnor663/blake2_simd ) from 0.5.11 to 1.0.0.
- [Release notes](https://github.com/oconnor663/blake2_simd/releases )
- [Commits](https://github.com/oconnor663/blake2_simd/compare/0.5.11...1.0.0 )
---
updated-dependencies:
- dependency-name: blake2b_simd
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-30 22:40:52 +00:00
Sylvestre Ledru
050b5b0c9b
ln: make the tests/ln/hard-backup.sh test work
...
We haven't a great error message with hard link on the same file
+ Update the GNU error message to match ours
2022-03-30 20:00:11 +02:00
Daniel Hofstetter
b9ac38084c
df: rename two constants
...
OPT_HUMAN_READABLE -> OPT_HUMAN_READABLE_BINARY
OPT_HUMAN_READABLE_2 -> OPT_HUMAN_READABLE_DECIMAL
2022-03-30 16:47:08 +02:00
Sylvestre Ledru
1e6b248a77
Merge pull request #3304 from ackerleytng/main
...
wc: compute number widths using total file sizes
2022-03-30 09:52:21 +02:00
Pyokyeong Son
ea592e5c03
Merge branch 'main' into mkdir-fix
2022-03-30 12:30:27 +09:00
Sylvestre Ledru
05ec34eb94
Merge pull request #3322 from jfinkels/df-multiple-columns-error
...
df: error on duplicate columns in --output arg
2022-03-29 22:30:14 +02:00
Sylvestre Ledru
52b2d2ac1c
Merge pull request #3309 from cakebaker/fix_use_percentage_calculation
...
df: fix calculation of Use% column
2022-03-29 15:19:52 +02:00
Daniel Hofstetter
e152ebaead
df: fix calculation of Use% column
...
Change formula from: "Used/Size * 100" to "Used/(Used + Avail) * 100".
This formula also works if "Used" and "Avail" do not add up to "Size",
which is the case if there are reserved disk blocks.
2022-03-28 18:57:12 +02:00
DevSabb
36ec76e1fa
Merge branch 'uutils:main' into shuf-gnu-test
2022-03-28 12:56:38 -04:00
Ackerley Tng
e9131e2b7f
wc: compute number widths using total file sizes
...
Previously, individual file sizes were used to compute the number width, which
would cause misalignment when the total has a greater number of digits, and is
different from the behavior of GNU wc
```
$ ./target/debug/wc -w -l -m -c -L deny.toml GNUmakefile
95 422 3110 3110 85 deny.toml
349 865 6996 6996 196 GNUmakefile
444 1287 10106 10106 196 total
$ wc -w -l -m -c -L deny.toml GNUmakefile
95 422 3110 3110 85 deny.toml
349 865 6996 6996 196 GNUmakefile
444 1287 10106 10106 196 total
```
2022-03-28 18:56:34 +02:00
DevSabb
68b1f04f7d
fix more clippy warnings
2022-03-28 11:09:26 -04:00
DevSabb
16ad4bc069
fix clippy warning
2022-03-28 10:31:27 -04:00
DevSabb
f6cb42ee2d
shuf: accept multiple occurances of head-count argument
2022-03-28 10:17:07 -04:00
Daniel Hofstetter
a68d77b8cf
df: --output w/o "=" doesn't expect further args
...
"df --output ." was treated as "df --output=." and hence "." was
interpreted as a column name. With this commit, "." is treated as
an argument on its own.
Fixes #3324
2022-03-28 10:13:54 +02:00
Jeffrey Finkelstein
a1f300e8a7
df: allow multiple occurrences of --output arg
...
Allow multiple occurrences of the `--output` argument. For example,
$ df --output=source --output=target | head -n1
Filesystem Mounted on
2022-03-27 22:14:16 -04:00
Jeffrey Finkelstein
6f32a1921a
df: error on duplicate columns in --output arg
...
Print a usage error when duplicat column names are specified to the
`--output` command-line argument. For example,
$ df --output=source,source
df: option --output: field ‘source’ used more than once
Try 'df --help' for more information.
2022-03-27 22:02:55 -04:00
Sylvestre Ledru
d5d6bc3050
Merge pull request #3294 from jfinkels/df-file-column
...
df: implement the File column
2022-03-27 23:41:50 +02:00
Sylvestre Ledru
c932236826
Merge pull request #3317 from sylvestre/ls-quote
...
ls: Add proper quotes on symlink with --quoting-style=shell-escape
2022-03-27 19:22:18 +02:00
Jeffrey Finkelstein
ab717ce370
df: implement the File column
...
Implement the "File" column in the `df` output table. Before this
commit, a blank entry appeared in the "File" column for each
row. After this commit, a "-" entry appears when `df` is run with no
positional arguments and the filename appears when run with positional
arguments. For example:
$ touch a b c && df --output=target,file a b c
Mounted on File
/ a
/ b
/ c
2022-03-27 13:17:36 -04:00
Jeffrey Finkelstein
b34685f8a5
timeout: return 125 on invalid time interval args
...
Exit with status 125 (indicating an error in `timeout` itself) when
the timeout duration is invalid or the "kill after" duration is
invalid.
2022-03-27 11:45:51 +02:00
Sylvestre Ledru
c79d146dde
ls: add support for --quoting-style=shell-escape b --color=auto
2022-03-27 10:50:00 +02:00
Sylvestre Ledru
bbee22bb1c
ls: Add missing quote with --quoting-style=shell-escape
...
Should fix GNU: tests/ls/symlink-quote.sh
2022-03-27 10:50:00 +02:00
Jeffrey Finkelstein
c43ef8b704
timeout: support long form of --kill-after arg
...
Add support for the long form of the `--kill-after`
argument. Previously only the short form `-k` was supported.
2022-03-26 20:20:30 -04:00
Sylvestre Ledru
98376d8fd5
Merge pull request #3311 from uutils/mkdir2
...
mkdir: gnu compat: add support of mkdir -p foo/.
2022-03-27 00:15:05 +01:00
Sylvestre Ledru
fbb64b9c5c
mkdir: gnu compat: add support of mkdir -p foo/.
2022-03-25 21:35:27 +01:00
Jeffrey Finkelstein
f856bfc479
dd: move ConversionMode parsing to parseargs mod.
...
Move the code for parsing the `ConversionMode` to use up to the
`parseargs` module. This location makes more sense for it because the
conversion mode can be determined entirely from the command-line
arguments at the time of parsing just like the other parameters. Using
an enum for this purpose also eliminates the amount of code we need
later on.
2022-03-25 20:56:38 +01:00
Jeffrey Finkelstein
b98bccf9cc
dd: move ConversionMode parsing to dd.rs
...
Move parsing of the `ConversionMode` outside of
`conv_block_unblock_helper()` and up to the code that calls it.
2022-03-25 20:56:38 +01:00
Jeffrey Finkelstein
bd626df70e
dd: replace cascading if/else if with enum match
...
Replace a cascading `if/else if` chain in `conv_block_unblock_helper()`
with a match statement on a new enum, `ConversionMode`, that enumerates
the various modes in which `dd` can operate.
2022-03-25 20:56:38 +01:00
Pyokyeong Son
8108fb15b6
Merge branch 'uutils:main' into mkdir-fix
2022-03-25 23:03:29 +09:00
Sylvestre Ledru
fe648b2666
Merge pull request #3297 from jfinkels/timeout-invalid-signal
...
timeout: produce usage error on invalid signal
2022-03-23 21:05:34 +01:00
Kartik Sharma
6b85579498
Merge branch 'uutils:main' into stat-fails-to-read-a-file-redirected-to-stdin
2022-03-23 20:09:42 +05:30
Kartik Sharma
193899f09c
Modified code to replace all instances of -
...
Now all instances of `-` will be replaced with real / canonicalized
path of `/dev/stdin`
2022-03-23 20:05:20 +05:30
Sylvestre Ledru
33c49666c3
nproc: make tests/misc/nproc-override.sh pass by implementing OMP_NUM_THREADS=X,Y,Z ( #3296 )
...
+ nproc tests: use assert_eq when comparing the two values
Co-authored-by: jfinkels <jfinkels@users.noreply.github.com>
2022-03-23 12:12:54 +01:00
Jeffrey Finkelstein
760a15aa74
timeout: produce usage error on invalid signal
...
Produce a usage error on an invalid signal argument. For example,
$ timeout --signal=invalid 1 sleep 0
timeout: 'invalid': invalid signal
Try 'timeout --help' for more information.
2022-03-23 08:39:55 +01:00
Jeffrey Finkelstein
e357d2650c
clippy fixes from nightly rust
2022-03-22 21:44:33 -04:00
Terts Diepraam
fc1fa8d1f7
Merge pull request #3027 from shoriminimoe/2986-cp
...
cp: only allow directory for -t
2022-03-22 23:08:54 +01:00
Sylvestre Ledru
291b889d66
Merge pull request #3256 from chordtoll/iseek-oseek
...
dd: implement iseek + oseek flags
2022-03-22 20:31:05 +01:00
Sylvestre Ledru
8044981df0
Merge pull request #3289 from uutils/dependabot/cargo/ouroboros-0.15.0
...
build(deps): bump ouroboros from 0.14.2 to 0.15.0
2022-03-22 08:08:13 +01:00
Terts Diepraam
5eeac5881a
Merge pull request #3285 from sylvestre/ls_aA
...
ls: when -aA are provided, the order matters
2022-03-21 18:14:13 +01:00
Terts Diepraam
e9a6cf043f
Merge pull request #3286 from sylvestre/nproc-2
...
nproc: add the full support of OMP_THREAD_LIMIT
2022-03-21 18:11:41 +01:00
dependabot[bot]
2024cc37e6
build(deps): bump ouroboros from 0.14.2 to 0.15.0
...
Bumps [ouroboros](https://github.com/joshua-maros/ouroboros ) from 0.14.2 to 0.15.0.
- [Release notes](https://github.com/joshua-maros/ouroboros/releases )
- [Commits](https://github.com/joshua-maros/ouroboros/compare/0.14.2...0.15.0 )
---
updated-dependencies:
- dependency-name: ouroboros
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 16:50:55 +00:00
Sylvestre Ledru
7963287c6c
Merge pull request #3282 from uutils/dependabot/cargo/libc-0.2.121
...
build(deps): bump libc from 0.2.113 to 0.2.121
2022-03-21 17:49:11 +01:00
Sylvestre Ledru
4942e519fa
nproc: add the full support of OMP_THREAD_LIMIT
2022-03-21 13:46:22 +01:00
Sylvestre Ledru
187bddb6af
ls: support multiple -a or -A
2022-03-21 13:32:23 +01:00
Sylvestre Ledru
ce28aa8b8a
Merge pull request #3287 from cakebaker/missing_spaces
...
sort: add two missing spaces in help texts
2022-03-21 13:14:28 +01:00
Sylvestre Ledru
d3e2ad2d50
Merge pull request #3283 from jfinkels/timeout-usage-error
...
timeout: give usage error on invalid time interval
2022-03-21 09:27:58 +01:00
Sylvestre Ledru
3009c73e9c
ls -aA: Add a comment
2022-03-21 09:13:56 +01:00
Daniel Hofstetter
a1d6a8f17a
sort: add two missing spaces in help texts
2022-03-21 09:13:33 +01:00
Sylvestre Ledru
af8726af43
ls: when -aA are provided, the order matters
2022-03-20 23:23:17 +01:00
Jeffrey Finkelstein
c39c917db7
sleep: give usage error on invalid time interval
...
For example,
$ sleep xyz
sleep: invalid time interval 'xyz'
Try 'sleep --help' for more information.
This matches the behavior of GNU sleep.
2022-03-20 15:21:50 -04:00
Jeffrey Finkelstein
e849aaf846
timeout: give usage error on invalid time interval
2022-03-20 15:16:03 -04:00
dependabot[bot]
34d2d1d05e
build(deps): bump libc from 0.2.113 to 0.2.121
...
Bumps [libc](https://github.com/rust-lang/libc ) from 0.2.113 to 0.2.121.
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.113...0.2.121 )
---
updated-dependencies:
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-20 18:14:52 +00:00
dependabot[bot]
aea30bd4a7
build(deps): bump ioctl-sys from 0.6.0 to 0.8.0
...
Bumps [ioctl-sys](https://github.com/jmesmon/ioctl ) from 0.6.0 to 0.8.0.
- [Release notes](https://github.com/jmesmon/ioctl/releases )
- [Commits](https://github.com/jmesmon/ioctl/compare/ioctl-sys-0.6.0...ioctl-sys-0.8.0 )
---
updated-dependencies:
- dependency-name: ioctl-sys
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-20 16:46:37 +00:00
Sylvestre Ledru
04b219bdef
Merge pull request #3229 from uutils/dependabot/cargo/clap-3.1.6
...
build(deps): bump clap from 3.0.10 to 3.1.6
2022-03-20 17:44:33 +01:00
Jeffrey Finkelstein
b79ff6b4fd
split: avoid writing final empty chunk with -C
...
Fix a bug in which a final empty file was written when using `split
--line-bytes` mode.
2022-03-20 09:30:58 -04:00
Sam Caldwell
f40fecf86d
Add UError impl for clap::Error
2022-03-20 13:50:39 +01:00
Sam Caldwell
979909e371
cp: better error message for target-directory
2022-03-20 13:50:39 +01:00
Sam Caldwell
efd627bb20
cp: only allow directory for -t
2022-03-20 13:50:39 +01:00
Kartik Sharma
71a6ae1443
Added support to read a filename redirected to stdin
...
- Canonicalization of `/dev/stdin` which points to stdin file
2022-03-20 17:57:00 +05:30
Terts Diepraam
d90a81fb46
all utils: remove short help flag if another -h flag is present
2022-03-20 11:16:20 +01:00
Jeffrey Finkelstein
95f58fbf3c
split: handle no final newline with --line-bytes
...
Fix a panic due to out-of-bounds indexing when using `split
--line-bytes` with an input that had no trailing newline.
2022-03-19 23:50:02 -04:00
Terts Diepraam
32cadbc715
pinky: don't include short flag in help
2022-03-19 23:07:04 +01:00
Sylvestre Ledru
1d17400b80
Merge pull request #3274 from jfinkels/split-elide-empty-files
...
split: elide all chunks when input file is empty
2022-03-19 22:52:57 +01:00
Sylvestre Ledru
377da0ded4
Merge pull request #3270 from cakebaker/ticket_3251
...
df: omit reserved filesystem blocks in "Available"
2022-03-19 22:50:33 +01:00
Terts Diepraam
bec00546f1
Merge pull request #3263 from cakebaker/remove_direct_option
...
df: remove unused "--direct" option
2022-03-19 22:38:05 +01:00
Sylvestre Ledru
f4146da604
Merge pull request #3275 from jfinkels/split-handle-broken-pipe
...
split: catch and handle broken pipe errors
2022-03-19 21:53:11 +01:00
Jeffrey Finkelstein
0a226524a6
split: elide all chunks when input file is empty
...
Fix a bug in the behavior of `split -e -n NUM` when the input file is
empty. Previously, it would panic due to overflow when subtracting 1
from 0. After this change, it will terminate successfully and produce
no output chunks.
2022-03-19 14:32:28 -04:00
Jeffrey Finkelstein
6d2eff9c27
split: catch and handle broken pipe errors
...
Catch `BrokenPipe` errors and silently ignore them so that `split`
terminates successfully on a broken pipe. This matches the behavior of
GNU `split`.
2022-03-19 12:11:03 -04:00
Terts Diepraam
76edba0e1e
Merge branch 'unittests-in-ci' of github.com:tertsdiepraam/coreutils into unittests-in-ci
2022-03-19 10:58:59 +01:00
Terts Diepraam
094bb61a63
fxi tests for unittests in dd and hashsum
2022-03-19 10:58:45 +01:00
Sylvestre Ledru
3c88fb460b
Merge branch 'main' into dependabot/cargo/clap-3.1.6
2022-03-19 09:26:05 +01:00
Sylvestre Ledru
01da0171b5
Merge pull request #3272 from jfinkels/uucore-parse-time-overflow
...
uucore, sleep: use Duration::saturating_mul and saturating_add to avoid overflow
2022-03-19 09:24:03 +01:00
Jeffrey Finkelstein
ce2a026ff8
sleep: use Duration::saturating_add to sum times
...
Use `Duration::saturating_add()` to avoid a panic due to overflow when
adding the durations provided as command-line arguments.
2022-03-18 23:15:02 -04:00
Daniel Hofstetter
50c6599a32
df: omit reserved filesystem blocks in "Available"
...
fixes #3251
2022-03-18 20:45:15 +01:00
Daniel Hofstetter
ac8dcb6bd3
df: remove unused "--direct" option
2022-03-18 20:45:09 +01:00
chordtoll
a84202ee00
Combine 4 duplicate seek/skip parsing functions into one
2022-03-18 20:45:04 +01:00
chordtoll
b77b3cba55
dd: implement iseek + oseek flags
...
These are the first half of changes needed to pass the dd/bytes.sh tests:
- Add iseek and oseek options (additive with skip and seek options)
- Implement tests for the new flags, matching those from dd/bytes.sh
2022-03-18 20:45:04 +01:00
Benjamin Bouvier
65f94c9d39
Remove duplicate paste dependency
2022-03-18 20:44:01 +01:00
Sylvestre Ledru
9796e01df6
Revert "split: implement round-robin arg to --number"
2022-03-18 14:45:29 +01:00
Terts Diepraam
04de1251dd
Merge branch 'main' into dependabot/cargo/clap-3.1.6
2022-03-18 09:54:04 +01:00
Benjamin Bouvier
ba5b2dc2ed
Remove unused dependencies by individual crates ( #3264 )
2022-03-17 22:48:17 +01:00
Terts Diepraam
20212be4c8
fix clippy errors related to clap upgrade from 3.0.10 to 3.1.6
2022-03-17 22:46:56 +01:00