Commit graph

6105 commits

Author SHA1 Message Date
renovate[bot]
bf228385e8
fix(deps): update rust crate glob to 0.3.1 2023-03-27 05:36:00 +00:00
renovate[bot]
515bd8f642
fix(deps): update rust crate dns-lookup to 1.0.8 2023-03-27 05:32:38 +00:00
Kamil Ogórek
68e90eacbb lint: Fix all issues in preparation for enabling clippy::if_not_else 2023-03-26 22:23:50 +02:00
Sylvestre Ledru
4695c2a204
Fix typo 2023-03-26 21:51:04 +02:00
Maciej Habasiński
d277603bf1 du: fmt fix 2023-03-26 23:38:31 +02:00
Sylvestre Ledru
8a3007efff
Merge pull request #4638 from tertsdiepraam/stdbuf-hotfix
`stdbuf`: get profile from the end of the path
2023-03-26 18:57:57 +02:00
Terts Diepraam
9991ab28d7
Merge pull request #4588 from anastygnome/fork
Refactor signal handling in yes, tee, and timeout
2023-03-26 17:16:50 +02:00
Sylvestre Ledru
ef601fac98
Merge pull request #4630 from sylvestre/inter-error
Adjust -i behavior for ln, cp & mv
2023-03-26 15:35:24 +02:00
Maciej Habasiński
ef9b974c41
du: comment alignment fix 2023-03-26 13:15:48 +02:00
Maciej Habasiński
e5a4c393af du: threshold fix comment 2023-03-26 15:08:02 +02:00
Daniel Hofstetter
aa4101fe2f
ln: use "replace" in interactive mode
GNU ln uses "replace" instead of "overwrite"
2023-03-26 12:18:26 +02:00
Tom D
e4408f3759 Refactor signal handling in yes, tee, and timeout
Yes, using libc while using nix was a bit redundant.
Upon investigation, duplicated code was found and moved to uucore.
2023-03-26 11:10:40 +02:00
Sylvestre Ledru
76793d523d
Merge pull request #4558 from leon3s/fix-test-with-parse-error
test: replace panic in favor of ParseError
2023-03-26 10:07:23 +02:00
Terts Diepraam
5dfa9548b7 stdbuf: get profile from the end of the path
The path is not always /target/{PROFILE}, because cross uses
/target/{TARGET_TRIPLE}/profile, so we have to get the name
in another way. StackOverflow recommended the getting the
third component from the back of the path
2023-03-25 18:04:01 +01:00
Maciej Habasiński
02f00e2c6b
du: fix --threshold err msg 2023-03-25 16:44:14 +01:00
Sylvestre Ledru
c0bd851184
Merge pull request #4629 from tertsdiepraam/uniq-remove-strum
`uniq`: remove `strum` dependency
2023-03-25 16:00:38 +01:00
leon3s
11fd56c2be test: fmt + requested change 2023-03-25 14:03:45 +01:00
leon3s
bf94e8fff1 test: refactor error handling with ParseError enum 2023-03-25 14:03:45 +01:00
leon3s
9fb18bb08c test: Remplaced panic in favor of ParseError 2023-03-25 14:03:45 +01:00
Terts Diepraam
5a60aa0a19 uniq: convert string to Delimiters manually instead of via strum 2023-03-25 11:57:03 +01:00
Terts Diepraam
aabfda6927 factor: remove paste dev dependency 2023-03-25 11:56:51 +01:00
Sylvestre Ledru
9d54ed02a8 ln -i: adjust the behavior to match the GNU change
Just like mv & cp

Matches the change upstream
7a69df88999bedd8e9fccf9f3dfa9ac6907fab66
2023-03-25 11:22:45 +01:00
Sylvestre Ledru
d0a4059f34 cp -i: adjust the behavior to match the GNU change
Just like mv

Note that cp -i -u won't show the overwrite question

Matches the change upstream
7a69df88999bedd8e9fccf9f3dfa9ac6907fab66
2023-03-25 11:22:45 +01:00
Sylvestre Ledru
0d5daacf99 mv -i: adjust the behavior to match the GNU change
Matches the change upstream
7a69df88999bedd8e9fccf9f3dfa9ac6907fab66
2023-03-25 11:22:45 +01:00
Sylvestre Ledru
20cfd299e7
Merge pull request #4493 from tertsdiepraam/shred-expand-buffer-size
`shred`: refactor to clean up code and reduce syscalls
2023-03-24 23:15:13 +01:00
Sylvestre Ledru
449b405eb1
Improve a syntax of the md 2023-03-24 23:15:07 +01:00
Sylvestre Ledru
f3c2ae853a
Improve a syntax of the md 2023-03-24 23:14:57 +01:00
Sylvestre Ledru
8e1082458f
Merge pull request #4393 from cakebaker/uucore_indent_usage_info
uucore: indent multiline usage info
2023-03-24 23:13:11 +01:00
Sylvestre Ledru
ed4222e731
Merge pull request #4470 from tertsdiepraam/release-fast-and-small
`release-fast` and `release-small` profiles and a page on packaging in the docs.
2023-03-24 23:03:18 +01:00
Sylvestre Ledru
cd7d9b721d
Merge pull request #4566 from SSJDeathSpawn/main
fix: to show the name of utility instead of 'manpages'
2023-03-24 22:55:49 +01:00
Daniel Hofstetter
cc77a952f5
Merge pull request #4589 from piotrkwiecinski/more-move-string-to-md-file
more: move help strings to markdown file
2023-03-24 07:11:37 +01:00
Daniel Hofstetter
e03ed21e10
Merge pull request #4591 from piotrkwiecinski/nice-move-string-to-md-file
nice: move help strings to markdown file
2023-03-24 07:06:13 +01:00
Piotr Kwiecinski
d4758ff3c8 more: modernize about section 2023-03-23 18:44:03 +01:00
Sylvestre Ledru
9090dd783a
Merge pull request #4590 from piotrkwiecinski/mv-move-string-to-md-file
mv: move help strings to markdown file
2023-03-23 18:11:45 +01:00
Piotr Kwiecinski
ac01925583 mv: restore backup control long help 2023-03-23 16:12:55 +01:00
Piotr Kwiecinski
6c9664433f more: group about and usage 2023-03-23 16:09:04 +01:00
Piotr Kwiecinski
04c0b5118d mv: remove long help, change static to const, remove whitespace 2023-03-23 16:06:10 +01:00
Daniel Hofstetter
7853d3707b
Merge pull request #4583 from piotrkwiecinski/join-move-string-to-md-file
join: move help strings to markdown file
2023-03-23 16:01:53 +01:00
Piotr Kwiecinski
896314a64e nice: move help strings to markdown file 2023-03-23 14:52:33 +01:00
Piotr Kwiecinski
0768c63361 mv: move help strings to markdown file 2023-03-23 14:30:17 +01:00
Piotr Kwiecinski
d96aa3e098 more: move help strings to markdown file 2023-03-23 14:07:12 +01:00
Daniel Hofstetter
2db88f1f26
Merge pull request #4585 from piotrkwiecinski/id-move-string-to-md-file
id: move help strings to a markdown file
2023-03-23 13:46:21 +01:00
Daniel Hofstetter
5d9585a743
Merge pull request #4587 from piotrkwiecinski/logname-move-string-to-md-file
logname: move help strings to markdown file
2023-03-23 13:43:12 +01:00
Daniel Hofstetter
c51e0db35f
join: add missing "join" to markdown file 2023-03-23 13:38:27 +01:00
Daniel Hofstetter
6970da3b2b
Merge pull request #4581 from piotrkwiecinski/touch-move-string-to-md-file
touch: move help strings to markdown file
2023-03-23 13:34:26 +01:00
Piotr Kwiecinski
6adcf066de logname: move help strings to markdown file 2023-03-23 12:06:59 +01:00
Piotr Kwiecinski
186c85522e id: move help strings to a markdown file 2023-03-23 11:16:03 +01:00
Piotr Kwiecinski
540435806c join: move help strings to markdown file 2023-03-23 10:44:29 +01:00
Piotr Kwiecinski
4597a5dac0 touch: move help strings to markdown file 2023-03-23 10:10:59 +01:00
Piotr Kwiecinski
d70b3e72c4 nproc: move help strings to markdown file 2023-03-23 08:57:18 +01:00
Daniel Hofstetter
57541db124
Merge pull request #4569 from piotrkwiecinski/uucore_help_section
uucore: fix help section doesn't render 3+ level headers
2023-03-23 08:03:00 +01:00
Daniel Hofstetter
5c1f82b5ff
Merge pull request #4568 from piotrkwiecinski/cut-move-string-to-md-file-rework
cut: move help strings to markdown file
2023-03-22 17:11:47 +01:00
Piotr Kwiecinski
154370a0c6 uucore: parse_help_section test section with multiple header 2023-03-22 16:57:41 +01:00
Daniel Hofstetter
76e418433b
cut: add some backticks to markdown file 2023-03-22 16:10:36 +01:00
Piotr Kwiecinski
dc76939de9 hostid: move help strings to markdown file 2023-03-22 15:28:12 +01:00
Miles Liu
c1bd9e556e
users: move help strings to markdown file 2023-03-22 11:21:19 +08:00
Piotr Kwiecinski
3b54421e9c uucore: add comment to parse_help_section 2023-03-21 20:42:45 +01:00
Piotr Kwiecinski
5767d460b7 cut: add sourcefiles to spell-check ignored 2023-03-21 19:19:33 +01:00
Piotr Kwiecinski
2f0ba77872 uucore: fix help section doesn't render 3+ level headers 2023-03-21 19:10:20 +01:00
Piotr Kwiecinski
8c2fb3e09a cut: move help strings to markdown file 2023-03-21 19:04:30 +01:00
SSJDeathSpawn
4f88356035
refactor: simplification and name change 2023-03-21 18:52:54 +05:30
SSJDeathSpawn
6699eaad6c
Added condition to ensure name of utility appears 2023-03-21 18:19:17 +05:30
Sylvestre Ledru
7b1d49b0bc
Merge pull request #4563 from miles170/hashsum-move-help-strings-to-md-file
hashsum: move help strings to markdown file
2023-03-21 09:43:31 +01:00
Sylvestre Ledru
1a0ebdbb8a
Merge pull request #4564 from miles170/head-move-help-strings-to-md-file
head: move help strings to markdown file
2023-03-21 09:42:16 +01:00
Miles Liu
23e67adfd3
hashsum: fix style violation 2023-03-21 15:44:03 +08:00
Miles Liu
1c90daf25a
head: move help strings to markdown file 2023-03-21 15:39:11 +08:00
Daniel Hofstetter
62e5c5a755
hashsum: merge imports 2023-03-21 08:07:24 +01:00
Miles Liu
4bed10a26a
hashsum: move help strings to markdown file 2023-03-21 13:47:26 +08:00
Miles Liu
1d58362e1a
factor: move help strings to markdown file 2023-03-21 13:41:21 +08:00
Miles Liu
c9a95c37b2
progress: fix redundant_field_names clippy error 2023-03-21 09:20:35 +08:00
Miles Liu
d2a0a73a36
touch: fix err_expect clippy error 2023-03-21 09:20:35 +08:00
Terts Diepraam
b8f2f295a6
Merge pull request #4498 from jfinkels/dd-seconds-precision-3
dd: fix precision for display of total time spent
2023-03-20 12:52:48 +01:00
Daniel Hofstetter
00f506f43d
Merge pull request #4551 from piotrkwiecinski/expand-move-strings-to-md-files
expand: move help strings to markdown file
2023-03-20 08:25:33 +01:00
Daniel Hofstetter
a484453bd7
Merge pull request #4553 from piotrkwiecinski/false-move-strings-to-md-files
false: move help strings to markdown file
2023-03-20 08:22:13 +01:00
Daniel Hofstetter
47884d739b
Merge pull request #4554 from piotrkwiecinski/groups-move-strings-to-md-files
groups: move help strings to markdown file
2023-03-20 08:19:05 +01:00
jfinkels
59d34ce667
Merge branch 'main' into dd-seconds-precision-3 2023-03-19 13:29:14 -04:00
Piotr Kwiecinski
a9dd3eb03f groups: fix formatting 2023-03-19 17:18:15 +01:00
Daniel Hofstetter
f056a74432
Merge pull request #4552 from piotrkwiecinski/fold-move-strings-to-md-files
fold: move move help strings to markdown file
2023-03-19 16:13:40 +01:00
Piotr Kwiecinski
053a1216a3 groups: move move help strings to markdown file 2023-03-19 15:46:42 +01:00
Piotr Kwiecinski
a2668e1433 false: move move help strings to markdown file 2023-03-19 15:39:24 +01:00
Piotr Kwiecinski
1c3ae95e8a expand: docs wrap FILE with backticks 2023-03-19 14:15:05 +01:00
Piotr Kwiecinski
96a148b558 fold: move move help strings to markdown file 2023-03-19 13:18:03 +01:00
Piotr Kwiecinski
f4a4bc9edb expand: move help strings to markdown file 2023-03-19 12:56:38 +01:00
Piotr Kwiecinski
0ca5020b08 who: move help strings to markdown file 2023-03-19 11:59:14 +01:00
Sylvestre Ledru
7053543830
Merge pull request #4529 from papparapa/mknod-move-help-strings-to-md-file
mknod: move help strings to markdown file
2023-03-19 09:04:15 +01:00
Sylvestre Ledru
257587accf
Merge pull request #4547 from papparapa/mktemp-move-help-strings-to-md-file
mktemp: move help strings to markdown file
2023-03-19 09:01:35 +01:00
Surya Teja K
b39c4d2756
date: fix invalid argument error for RFC 3339 (#4535) 2023-03-19 08:54:45 +01:00
Koki Ueha
7376f3ad02 mktemp: move help strings to markdown file 2023-03-19 03:58:56 +00:00
papparapa
3b78b2e92f
Update src/uu/mknod/mknod.md
Co-authored-by: Sylvestre Ledru <sledru@mozilla.com>
2023-03-19 00:42:27 +09:00
papparapa
8393118aee
Update src/uu/mknod/mknod.md
Co-authored-by: Sylvestre Ledru <sledru@mozilla.com>
2023-03-19 00:42:16 +09:00
august radjoe
89b83c2f6a
A better handler for ./coreutils date -f aze (#4482) 2023-03-18 14:19:57 +01:00
Koki Ueha
7f00dfda76 mknod: move help strings to markdown file 2023-03-18 12:43:00 +00:00
Daniel Hofstetter
882a35c3b6
Merge pull request #4526 from tertsdiepraam/date-d-should-return-1
`date`: make sure 'invalid date' message also returns exit code 1
2023-03-18 07:08:04 +01:00
Terts Diepraam
e3aab307fe
Merge pull request #4189 from jfinkels/dd-stdin-from-file-descriptor
dd: open stdin from file descriptor when possible
2023-03-18 01:30:31 +01:00
Terts Diepraam
1b1446ce0c date: make sure 'invalid date' message also returns exit code 1 2023-03-17 21:49:26 +01:00
Terts Diepraam
2a4b48f253
Merge pull request #4442 from bbara/chmod-usage
chmod: fix GNU test 'chmod/usage'
2023-03-17 15:18:39 +01:00
Anish Bhobe
624588d37f date: Added default value for date --i.
`default_missing_value` set to `OPT_DATE` (`"date"`)
`num_args(0..=1)` required for `default_missing_value`.

Using function name `test_date_rfc_8601_default`.
The function name `test_date_rfc_8601` is left intact for
compatibility.
 
Fixes: #4521
2023-03-17 03:06:31 +01:00
Benjamin Bara
e982d57819 chmod: fix GNU test 'chmod/usage' 2023-03-16 21:25:26 +01:00
Surya Teja K
bd6905cf59
fix: match date -I error messages with GNU date (#4499)
* date: use value_parser to improve errors

* date: update panic! to unreachable inside impl From for Iso8601Format
2023-03-16 20:50:37 +01:00
Daniel Hofstetter
4e03e6254f
Merge pull request #4518 from miles170/uptime-move-help-strings-to-md-file
uptime: move help strings to markdown file
2023-03-16 16:09:57 +01:00
Miles Liu
6956377405
uptime: remove unused import 2023-03-16 19:44:27 +08:00
Miles Liu
66fef28ec6
uptime: move help strings to markdown file 2023-03-16 19:42:44 +08:00
Miles Liu
f623a7e13a
whoami: move help strings to markdown file 2023-03-16 19:39:36 +08:00
ValentinyFilip
2e36fa4f16 cksum: fix markdown format 2023-03-16 09:49:48 +01:00
ValentinyFilip
7c6a948526 cksum: fix format error 2023-03-15 21:05:55 +01:00
ValentinyFilip
61ad84f447 cksum: move help strings to markdown file 2023-03-15 19:09:38 +01:00
Terts Diepraam
0c4f5864d9 Add release-fast and release-small targets to Cargo.toml 2023-03-15 14:35:20 +01:00
Terts Diepraam
dad474bfa0
Merge pull request #4315 from miles170/issue-4176-fix-timeout
timeout: fix subprocess is never terminated
2023-03-15 14:10:58 +01:00
Daniel Hofstetter
5967d66a20
Merge pull request #4508 from tertsdiepraam/pwd-minirefactor
`pwd`: small refactor of some match expressions
2023-03-14 07:09:36 +01:00
Terts Diepraam
d241ec7e08 pwd: small refactor of some match expressions 2023-03-13 22:19:29 +01:00
Terts Diepraam
ae53b700d4 shred: make dependency on libc explicit 2023-03-13 18:18:42 +01:00
Terts Diepraam
9e0d3ea698 shred: add "prefill" to spelling list 2023-03-13 18:18:42 +01:00
Terts Diepraam
2ac4ee820e shred: rename FilenameGenerator to FilenameIter and refactor it a bit 2023-03-13 18:18:41 +01:00
Terts Diepraam
cec92046ca shred: use show_error instead of println for verbose logs 2023-03-13 18:18:41 +01:00
Terts Diepraam
015de72931 shred: move help strings to markdown files 2023-03-13 18:18:28 +01:00
Koki Ueha
a480ab0694 mkfifo: move help strings to markdown file 2023-03-13 15:04:46 +00:00
Joining7943
5fb091a4fb sleep: Use fundu error types to improve error messages 2023-03-12 15:37:44 +01:00
Joining7943
3a28b616d9 sleep: Use fundu instead of uucore::parse_time::from_str 2023-03-12 15:37:44 +01:00
Terts Diepraam
9a231be9c5
Merge branch 'main' into dd-seconds-precision-3 2023-03-12 14:14:53 +01:00
Terts Diepraam
7a6092b333
Merge branch 'main' into dd-stdin-from-file-descriptor 2023-03-12 13:56:28 +01:00
Terts Diepraam
0ff83388b9 shred: refactor the pattern writing 2023-03-12 13:42:32 +01:00
Terts Diepraam
4e3d50064e shred: improve performance by switching to StdRng
Also contains some cleanup
2023-03-12 13:42:32 +01:00
Terts Diepraam
73d5c4474b shred: expand buffer size from 512 to 65536 to reduce write calls
This buffer size matches GNU
2023-03-12 13:42:32 +01:00
Terts Diepraam
320929d83d
Merge branch 'main' into issue-4176-fix-timeout 2023-03-12 13:35:27 +01:00
Sylvestre Ledru
0d03c48f6b Move the declaration at the right place 2023-03-12 11:12:09 +01:00
Sylvestre Ledru
27150a970b Merge the use declarations 2023-03-12 11:12:09 +01:00
shaoyuteng
fcdb7e48ed relpath: move help strings to markdown file 2023-03-12 11:12:09 +01:00
papparapa
e5b6f63305
parser: fix index out of bounds error (#4484)
+ revert 1bc9980 to use files in workspace
2023-03-12 11:07:59 +01:00
Jeffrey Finkelstein
2f56536637 dd: fix precision for display of total time spent
Improve the display of the total time spent transferring bytes so that
the number of seconds is displayed using the `%g` format specifier as
in `printf`. This matches the behavior of GNU `dd`.

Before this commit, the precision was always set to one digit after
the decimal point. For example,

    $ dd count=100000 if=/dev/zero of=/dev/null
    100000+0 records in
    100000+0 records out
    51200000 bytes (51 MB, 49 MiB) copied, 0.2 s, 268.1 MB/s

After this commit, the precision increases dynamically as the duration
decreases. For example,

    $ dd count=100000 if=/dev/zero of=/dev/null
    100000+0 records in
    100000+0 records out
    51200000 bytes (51 MB, 49 MiB) copied, 0.1019 s, 507 MB/s
    $ dd count=1000 if=/dev/zero of=/dev/null
    1000+0 records in
    1000+0 records out
    512000 bytes (512 kB, 500 KiB) copied, 0.002663 s, 256 MB/s
    $ dd count=10 if=/dev/zero of=/dev/null
    10+0 records in
    10+0 records out
    5120 bytes (5.1 kB, 5.0 KiB) copied, 0.000182 s, 5.1 MB/s
2023-03-11 22:37:43 -05:00
Jeffrey Finkelstein
9cb6b4a3c0 dd: open stdin from file descriptor when possible
Open stdin using its file descriptor so that a `dd skip=N` command in
a subshell does not consume all bytes from stdin.

For example, before this commit, multiple instances of `dd` reading
from stdin and appearing in a single command line would incorrectly
result in an empty stdin for each instance of `dd` after the first:

    $ printf "abcdef\n" | (dd bs=1 skip=3 count=0 && dd)  2> /dev/null
    # incorrectly results in no output

After this commit, the `dd skip=3` process reads three bytes from the
file descriptor referring to stdin without draining the remaining
three bytes when it terminates:

    $ printf "abcdef\n" | (dd bs=1 skip=3 count=0 && dd)  2> /dev/null
    def
2023-03-11 20:56:37 +00:00
Miles Liu
b8d9552ef5
shred: fix permissions_set_readonly_false clippy error 2023-03-11 14:45:42 +08:00
Daniel Hofstetter
97b51df2bc od: add missing backticks 2023-03-10 15:24:33 +01:00
Daniel Hofstetter
62826143b5 od: regroup constants 2023-03-10 15:07:40 +01:00
Daniel Hofstetter
fa7550cad9 od: expand some wildcard imports 2023-03-10 15:06:07 +01:00
Miles Liu
f406b56f4a
timeout: fix subprocess is never terminated 2023-03-10 18:08:54 +08:00
Koki Ueha
e3d501fca1 printenv: move help strings to markdown file 2023-03-09 14:56:00 +00:00
wuseyu
7598404345
nl: move help strings to a markdown file (#4477) 2023-03-09 10:42:39 +01:00
IZUMI-Zu
308760d488
uname: doc format 2023-03-08 20:46:18 +08:00
IZUMI-Zu
0bb557bf25 uname: move help strings to a markdown file 2023-03-08 16:57:25 +08:00
Sylvestre Ledru
8f623464ce
Merge pull request #4472 from wuseyu/dev
env: move help strings to a markdown file
2023-03-08 09:10:26 +01:00
Sylvestre Ledru
68b58453df
Merge pull request #4474 from papparapa/csplit-move-help-strings-to-md-file
csplit: move help strings to markdown file
2023-03-07 17:33:51 +01:00
Terts Diepraam
69406e7d52
Merge pull request #4439 from Joining7943/sleep-fix-panic-adding-durations
`sleep`: Fix parsing of multiple inputs panics on overflow, some whitespace issues ...
2023-03-07 16:32:43 +01:00
Terts Diepraam
093e15766f
Merge pull request #4473 from papparapa/hostname-move-help-strings-to-md-file
hostname: move help strings to markdown file
2023-03-07 15:44:55 +01:00
Joining7943
71bbebdc76 sleep: Fix whitespace issues. Don't panic when adding durations.
Refactor error propagation and use show_error! instead of USimpleError.
2023-03-07 13:33:49 +01:00
Koki Ueha
1b95900ba9 csplit: move help strings to markdown file 2023-03-07 11:38:04 +00:00
Koki Ueha
cd709e2650 hostname: move help strings to markdown file 2023-03-07 11:00:17 +00:00
IZUMI-Zu
c90c8ea214 echo: move help strings to markdown file 2023-03-07 18:55:19 +08:00
wuseyu
3d4cea1105 env: fix some format error 2023-03-07 17:20:35 +08:00
Daniel Hofstetter
199978694a
Merge pull request #4469 from papparapa/install-move-help-strings-to-md-file
install: move help strings to markdown file
2023-03-07 09:12:03 +01:00
wuseyu
1db97834ec env: move help strings to a markdown file 2023-03-07 11:05:09 +08:00
Zaú Júlio
b540b15b5a
Merge branch 'main' into hotfix-mktemp 2023-03-06 21:39:56 -03:00
Koki Ueha
7daa258089 install: cargo fmt 2023-03-06 14:03:54 +00:00
Koki Ueha
e22771628f install: move help strings to markdown file 2023-03-06 14:00:35 +00:00
Koki Ueha
dbf7bfde11 chroot: add an annotation for spell-checker 2023-03-06 13:53:01 +00:00
Koki Ueha
7b39fecaf9 chroot: move help strings to markdown file 2023-03-06 12:44:52 +00:00
Sylvestre Ledru
d8a3ca0e56
Merge pull request #4348 from tmccombs/cp-pathbuf
cp: Use PathBuf instead of String for paths
2023-03-06 08:24:49 +01:00
Chen Chi
d971f45ed9 ptx: add description 2023-03-05 16:43:37 -08:00
Chen Chi
68d68f04ed ptx: move help strings to markdown file 2023-03-05 16:36:01 -08:00
Daniel Hofstetter
b35c415578 uucore: indent multiline usage info 2023-03-05 21:38:21 +01:00
Sylvestre Ledru
49eb9a2e91
Merge branch 'main' into cp-pathbuf 2023-03-05 16:22:21 +01:00
Sylvestre Ledru
3ed26dc454
Merge pull request #4462 from akhilerm/replace-version
replace VERSION string with clap::crate_version
2023-03-05 16:20:57 +01:00
Terts Diepraam
e1a98fea44
Merge pull request #4457 from sylvestre/md-check
Various improvements in the docs
2023-03-05 15:44:15 +01:00
Sylvestre Ledru
494b6f46e0
Merge pull request #4459 from sylvestre/manpages
Generate manpages and check them in the CI
2023-03-05 15:37:44 +01:00
Akhil Mohan
cf6f9a700d
replace VERSION string with clap::crate_version
replace VERSION string with clap::crate_version in chcon, chgrp and runcon
utilities

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2023-03-05 19:22:50 +05:30
curtain
dc0092c9e7
chmod: move help strings to markdown file (#4392) 2023-03-05 13:49:00 +01:00
Steven Chu
5449282a1a
For date, move help strings to .md file (#4458) 2023-03-05 13:48:15 +01:00
Akhil Mohan
f75c427b96
chgrp: move help strings to markdown file (#4461)
* chgrp: move help strings to markdown file

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2023-03-05 13:43:38 +01:00
Alexander Kunde
c386b27043
pwd: move help strings to markdown file (#4455) 2023-03-04 22:40:02 +01:00
Alexander Kunde
243fa21ce1
ls + vdir: move help strings to markdown file (#4454) 2023-03-04 21:27:14 +01:00
Sylvestre Ledru
79d18ab656 generate manpages 2023-03-04 19:42:28 +01:00
Sylvestre Ledru
a02cb75129 Consistency in the example declaration 2023-03-04 18:44:17 +01:00
Sylvestre Ledru
fe2517041f md: ignore a warning 2023-03-04 18:44:17 +01:00
Sylvestre Ledru
c68324a58c md: improve the display for dd, expr and stat 2023-03-04 18:44:14 +01:00
Sylvestre Ledru
422a27d375 parent 9d5dc500e6
author Sylvestre Ledru <sylvestre@debian.org> 1677865358 +0100
committer Sylvestre Ledru <sylvestre@debian.org> 1677951797 +0100

md: Fix a bunch of warnings in the docs
2023-03-04 18:43:40 +01:00
Zaú Júlio
65b1be9456
Merge branch 'main' into hotfix-mktemp 2023-03-03 14:22:07 -03:00
Sylvestre Ledru
9d5dc500e6
Merge pull request #4450 from papparapa/chown-move-help-strings-to-md-file
chown: move help strings to markdown file
2023-03-03 18:06:36 +01:00
Sylvestre Ledru
bd6d2e7898
Merge pull request #4391 from curtainp/basename-move-help-strings-to-md-file
basename: move help strings to markdown file
2023-03-03 17:55:43 +01:00
Sylvestre Ledru
eb21368535
Merge pull request #4453 from schoki040/wc-move-help-strings-to-md-file
wc: move help strings to markdown file
2023-03-03 16:53:26 +01:00
Sylvestre Ledru
2085d4d4ab
remove the sh in the syntax 2023-03-03 13:52:47 +01:00
Sylvestre Ledru
f12edf0f2a
Merge pull request #4456 from schoki040/truncate-move-help-strings-to-markdown-file
truncate: move help strings to markdown file
2023-03-03 13:52:19 +01:00
Sylvestre Ledru
53d3d4d616
remove the sh in the syntax 2023-03-03 13:12:49 +01:00
Sylvestre Ledru
c35d1762aa
Add RFILE to the exclude list 2023-03-03 12:53:45 +01:00
zleyyij
9fb6477c89
chcon: move help strings to a markdown file (#4437)
* arch: move help strings to a markdown file #4368

---------

Co-authored-by: zleyyij <zleyyi@users.noreply.github.com>
Co-authored-by: Sylvestre Ledru <sledru@mozilla.com>
Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
2023-03-03 12:37:09 +01:00
Alexander Kunde
b72c0504bc
Merge branch 'main' into wc-move-help-strings-to-md-file 2023-03-02 22:38:52 +01:00
Alexander Kunde
fa7c952878 Merge remote-tracking branch 'upstream/main' into truncate-move-help-strings-to-markdown-file 2023-03-02 22:34:42 +01:00
Zaú Júlio
b41713c106
Merge branch 'main' into hotfix-mktemp 2023-03-02 15:31:39 -03:00
Alexander Kunde
73bb60d724 cargo fmt 2023-03-02 18:56:08 +01:00
Alexander Kunde
aead80efdb cargo fmt 2023-03-02 18:55:11 +01:00
Alexander Kunde
b73d5206f5 remove redundant line in markdown 2023-03-02 18:18:40 +01:00
Alexander Kunde
4bae3e0cd9 remove redundant line 2023-03-02 18:14:10 +01:00
Alexander Kunde
4276111222 change ABOUT from static to const 2023-03-02 18:10:53 +01:00
Alexander Kunde
df5ceaaa97 truncate: move help strings to markdown file 2023-03-02 18:00:31 +01:00
Alexander Kunde
2bae3dd4f2 wc: move help strings to markdown file 2023-03-02 16:29:43 +01:00
Daniel Hofstetter
a7a55c7433 comm: allow multiple occurrence of -z 2023-03-02 16:18:42 +01:00
Terts Diepraam
b9bca794cc
Merge pull request #4449 from cakebaker/comm_zero_terminated
comm: implement --zero-terminated
2023-03-01 22:52:31 +01:00
Zaú Júlio
ddb9b592bf
Merge branch 'main' into hotfix-mktemp 2023-03-01 15:52:24 -03:00
Daniel Hofstetter
0d782e09c1 comm: implement --zero-terminated 2023-03-01 16:59:51 +01:00
Thomas Hurst
52c93a4d10 dd: Simplify loop of progress Alarm thread 2023-03-01 13:58:09 +00:00
Koki Ueha
f08f4d6016 chown: move help strings to markdown file 2023-03-01 12:44:20 +00:00
Benjamin Bara
26a945f3b5 tail: simplify obsolete parsing 2023-02-28 18:59:47 +01:00
Benjamin Bara
9b49f368c7 tail: parse default before obsolete 2023-02-28 18:58:12 +01:00
Benjamin Bara
f6edea2d05 tail: enable non-utf8 paths 2023-02-28 18:58:12 +01:00
Benjamin Bara
dc34e89d50 tail: skip clap for obsolete args 2023-02-28 18:58:12 +01:00
Benjamin Bara
b83c30b12e tail: improve GNU compatibility 2023-02-28 18:58:12 +01:00
Thomas Hurst
cf7b90bbe7 dd: use an alarm thread instead of elapsed() calls
Quick benchmark on FreeBSD 13.1-RELEASE:

Summary
  './dd-thread-alarm if=/dev/zero of=/dev/null count=4000000 status=progress' ran
  1.17 ± 0.17 times faster than './dd-baseline if=/dev/zero of=/dev/null count=4000000
        status=progress'
2023-02-28 17:45:14 +00:00
Zaú Júlio
276a6ccbf1
Merge branch 'main' into hotfix-mktemp 2023-02-28 12:39:39 -03:00
Joining7943
68f75af678 sleep: Fix duration parsing of multiple inputs when duration overflow should saturate and not panic 2023-02-28 08:04:55 +01:00
Terts Diepraam
f5a9ffe52f
Merge pull request #4443 from cakebaker/comm_move_help_strings_to_markdown_file
comm: move help strings to markdown file
2023-02-27 20:54:40 +01:00
Daniel Hofstetter
028b97098d comm: move help strings to markdown file 2023-02-27 17:33:14 +01:00
Koki Ueha
f06d46ef29 dirname: move help strings to markdown file 2023-02-27 14:13:06 +00:00
Zaú Júlio
5c3bb90df2
Merge branch 'main' into hotfix-mktemp 2023-02-27 01:15:36 -03:00
ZauJulio
a87bc9f929
mktemp: remove unnecessary convertion for path -> str just use prefix_from_template 2023-02-27 01:13:16 -03:00
Zan Baldwin
351be7f478 uptime: correctly calculate boot-time 2023-02-26 13:36:08 +01:00
Terts Diepraam
c148215e7d
Merge pull request #3954 from dmatos2012/modify-cp-archive-flag-behavior
cp: modify archive flag to copy dir contents rather than dir
2023-02-26 13:24:45 +01:00
Zaú Júlio
be2b7032f6
Merge branch 'main' into hotfix-mktemp 2023-02-25 18:37:22 -03:00
Terts Diepraam
5e851d4bde
Merge pull request #4435 from papparapa/dircolors-move-help-strings-to-md-file
dircolors: move help strings to markdown file
2023-02-25 13:19:32 +01:00
Terts Diepraam
542518c026
Merge pull request #4434 from papparapa/df-move-help-strings-to-md-file
df: move help strings to markdown file
2023-02-25 13:13:39 +01:00
Terts Diepraam
b7ed51bba1
Merge pull request #4401 from VorpalBlade/feature/stty-file-3863
stty: Basic support for --file/-F
2023-02-25 12:54:44 +01:00
Koki Ueha
ba4a9a05a1 dircolors: move help strings to markdown file 2023-02-25 10:46:19 +00:00
Koki Ueha
ac39a169a1 df: move help strings to markdown file 2023-02-25 10:27:03 +00:00
Cheng-Hao
3640a90d9f fmt: move help strings to markdown file 2023-02-24 00:44:02 -08:00
Sylvestre Ledru
872f2bd794
Merge pull request #4429 from chenchiii/realpath-move-help-strings-to-md-file
realpath: move help strings to markdown file
2023-02-24 09:00:24 +01:00
Chen Chi
93e1760bd3 realpath: move help strings to markdown file 2023-02-23 22:49:04 -08:00
Jeffrey Finkelstein
b9003d19ed dd: move dd_out() function up to module level
Move the `dd_out()` function out of the `impl Output` and up to the
module level, renaming it to `dd_copy()`. This change aligns it with
the pattern set by `std::io::copy()`, which similarly takes an input
reader and an output writer.

This does not change the behavior of `dd`, just the code organization
to make it more closely match the idioms in the Rust standard library.
2023-02-23 21:17:19 -05:00
Jeffrey Finkelstein
3faf64280d dd: move finalize() function to module level
Move the `finalize()` function out of the `impl Output` block and up
to the module level so that it can be accessed by other module-level
functions.
2023-02-23 21:06:38 -05:00
Sylvestre Ledru
c99accc85f
Merge pull request #4410 from dmatos2012/chmod-override-quiet-verbose-opts
chmod: allow verbose and quiet flags to be used more than once
2023-02-23 22:03:39 +01:00
Sylvestre Ledru
1ab1035b40
Merge pull request #4426 from papparapa/tail-move-help-strings-md-file
tail: move help strings to markdown file
2023-02-23 21:56:39 +01:00
Sylvestre Ledru
fb72641ff2
Merge pull request #4425 from papparapa/tee-move-help-strings-to-md-file
tee: move help strings to markdown file
2023-02-23 21:50:16 +01:00
Sylvestre Ledru
2ea050c8a9
Merge pull request #4424 from jhowww/ln-move-help-strings-to-md-file
ln: move help strings to markdown file
2023-02-23 21:48:39 +01:00
Sylvestre Ledru
f3fe6cf84b
Merge pull request #4423 from jhowww/link-move-help-strings-to-md-file
link: move help strings to markdown file
2023-02-23 21:46:31 +01:00
David Matos
d9a21ff8f0 chmod: allow verbose and quiet flags to be used more than once 2023-02-23 20:21:38 +01:00
Koki Ueha
58dae0a36d tail: move help strings to markdown file 2023-02-23 12:37:01 +00:00
Koki Ueha
c3817e5359 tee: move help strings to markdown file 2023-02-23 12:17:00 +00:00
Terts Diepraam
3554565c82
Merge pull request #4356 from howjmay/cksum-a
cksum: implement -a
2023-02-23 12:18:21 +01:00
Cheng-Hao
79ee0dd58d ln: move help strings to markdown file 2023-02-22 23:55:51 -08:00
Cheng-Hao
0c4bde342c link: move help strings to markdown file 2023-02-22 23:14:54 -08:00
Chen Chi
e54c0063b0 shuf: move help strings to markdown file 2023-02-22 21:01:38 -08:00
Yang Hau
b1d4951c34 add ALGORITHM_HELP_DESC 2023-02-23 12:06:24 +08:00
curtain
e37e5ad915
basename: fix rustfmt problem 2023-02-23 09:44:46 +08:00
Zaú Júlio
59490e4a17
Merge branch 'main' into hotfix-mktemp 2023-02-22 20:23:36 -03:00
Sylvestre Ledru
41018859bb
Merge pull request #4365 from kylemanna/km/fix-install-directory-chown
install: add missing directory chown
2023-02-22 21:49:22 +01:00
Sylvestre Ledru
7da22b3ae2
Merge pull request #4405 from bbara/utmpx-time
utmpx: arch/os-independent timeval handling
2023-02-22 21:26:10 +01:00
Sylvestre Ledru
380b3cff8c
Merge pull request #4388 from howjmay/timeout-parse
fix: Fix panic in multi-byte characters
2023-02-22 21:23:06 +01:00
Sylvestre Ledru
d3395b5855
Merge pull request #4412 from jhowww/rmdir-move-help-strings-to-md-file
rmdir: move help strings to markdown file
2023-02-22 21:05:09 +01:00
Sylvestre Ledru
ea2100a64a
Merge pull request #4415 from papparapa/nohup-move-help-strings-to-md-file
nohup: move help strings to markdown file
2023-02-22 21:04:33 +01:00
Sylvestre Ledru
257e6ea681
Merge pull request #4413 from jhowww/rm-move-help-strings-to-md-file
rm: move help strings to markdown file
2023-02-22 21:03:46 +01:00
zleyyij
a24da1d575
basenc: Move strings to markdown file (#4417)
basenc: moved help strings to markdown file
2023-02-22 21:02:39 +01:00
Benjamin Bara
dd216ee23e utmpx: cast timeval fields to i64 2023-02-22 18:50:08 +01:00
zleyyij
b70131f148
arch: move help strings to a markdown file (#4373)
Co-authored-by: zleyyij <zleyyi@users.noreply.github.com>
2023-02-22 16:50:27 +01:00
papparapa
29a25a6c85
od: move help strings to markdown file (#4406)
* od: move help strings to markdown file

* od: fix the commented points
2023-02-22 16:44:55 +01:00
Arvid Norlander
215803ec8d stty: Support for --file/-F
Fixes issue #3863
2023-02-22 16:38:18 +01:00
Terts Diepraam
ed30869b45 fix spell checker error in mkdir.md 2023-02-22 16:23:27 +01:00
Koki Ueha
52902f6e99 nohup: move help strings to markdown file 2023-02-22 10:41:49 +00:00
Terts Diepraam
60d2df56de
Merge pull request #4164 from jfinkels/dd-fifo-seek
dd: allow skipping and seeking in FIFOs
2023-02-22 10:38:45 +01:00
Terts Diepraam
8448d45dcf
Merge pull request #4411 from chenchiii/sleep-move-help-strings-to-md-file
sleep: move help strings to markdown file
2023-02-22 10:29:43 +01:00
Terts Diepraam
33c2c7d1c0
Merge pull request #4403 from jhowww/mkdir-move-help-strings-to-md-file
mkdir: move help strings to markdown file
2023-02-22 10:27:23 +01:00
Terts Diepraam
c3f7be1994
Merge branch 'main' into basename-move-help-strings-to-md-file 2023-02-22 10:25:03 +01:00
Cheng-Hao
4cbf9a6398 rm: move help strings to markdown file 2023-02-21 18:50:47 -08:00
Cheng-Hao
ab5d0b6b9d rmdir: move help strings to markdown file 2023-02-21 18:28:35 -08:00
Chen Chi
ddd40fda6b sleep: move help strings to markdown file 2023-02-21 15:56:52 -08:00
Guilherme A. de Souza
7d7b9eb49a
Migrate from atty to is-terminal (#4382) 2023-02-21 21:52:18 +01:00
Cheng-Hao
e6fec39db1 mkdir: update markdown naming for consistency 2023-02-21 11:05:35 -08:00
papparapa
4e7ae2d46a
du: move help strings to markdown file (#4384) 2023-02-21 16:51:59 +01:00
Yang Hau
9322580967 Add checksum algorithm abstractions 2023-02-21 21:14:58 +08:00
Cheng-Hao
7cfeba0d22 mkdir: move help strings to markdown file 2023-02-20 16:29:20 -08:00
David Matos
dd4299c32e chmod: supress verbose output when not verbose 2023-02-20 22:18:07 +01:00
David Matos
fe4da2b8e5 cp: modify archive flag to copy dir contents rather than dir 2023-02-20 16:49:33 +01:00
Terts Diepraam
cc0a77d357
Merge pull request #4395 from papparapa/kill-move-help-strings-to-md-file
kill: move help strings to markdown file
2023-02-20 14:16:42 +01:00
Koki Ueha
9bf9bba7c3 kill: move help strings to markdown file 2023-02-20 11:56:39 +00:00
Koki Ueha
e0470c0294 tac: move help strings to markdown file 2023-02-20 11:30:33 +00:00
curtain
f70d23b018
basename: update format according to #4385 2023-02-20 18:13:36 +08:00
Thayne McCombs
3acd75bcc4 cp: Use PathBuf instead of String for paths
I think this should avoid unnecessarily validating utf-8, and avoids a few allocations.
2023-02-19 23:32:17 -07:00
curtain
ff6f61276e
basename: move help strings to markdown file 2023-02-20 14:25:00 +08:00
Kyle Manna
05db5f7442 install: address merge request feedback
* Explicitly handle Err() in match.
* Move metdata functions deeper into `chown_optional_user_group()`.
* Add `ChownFailed` to propagate errors.
* Use `show_if_err!()` to wrap `chown_optional_user_group`.
* Simplify chown verbose message handling.
2023-02-19 11:47:45 -06:00
Koki Ueha
044f3d3a43 yes: move help strings to markdown file 2023-02-19 14:54:33 +00:00
Sylvestre Ledru
f77a44df8b
Merge pull request #4385 from cakebaker/uucore_procs_help_about
uucore_procs: extract "about" and "usage" info from new help structure
2023-02-19 11:47:18 +01:00
Yang Hau
109553436d add function profile 2023-02-19 18:09:34 +08:00
Kyle Manna
376f4d90ef install: add tests for invalid owner and group
* Move the user and group resolution to the behavior decoding instead of
  re-running on every file/directory creation.  Simplifies code.
* Update error output to match GNU coreutils.
* Add tests to verify invalid owner and group.
2023-02-18 22:46:12 -06:00
Kyle Manna
5876cd2581 install: add missing directory chown
* Re-factor the copy function chown into a function that can be re-used.
* Fix bug where the group overwrote the user.
* Add chown compatibility to follow GNU coreutils.
* Reduce two chown calls to a single syscall only when needed.
* Fixes #4361
2023-02-18 22:46:12 -06:00
Kyle Manna
7aa7f219a0 install: fix issue #4360 with bad target directory permissions
* Correct bug that set the last directory to the mode the file should
  have been set to.
* Add unit test to verify correct functionality.
2023-02-18 22:32:31 -06:00
Yang Hau
2cd19522e4 fix: Fix panic in multi-byte characters
Closes #4353
2023-02-19 10:15:53 +08:00
Jeffrey Finkelstein
c52647a632 dd: add support for skipping in input FIFO
For example, `dd skip=1 if=fifo` will now work.
2023-02-18 21:24:16 +01:00
Jeffrey Finkelstein
9c3f810f97 dd: add support for seeking in output FIFOs
For example, `dd seek=1 of=fifo` will now work.
2023-02-18 21:24:16 +01:00
Jeffrey Finkelstein
cf72c990f2 dd: create Source enum and simpler Input struct
This mirrors a recent commit that introduced the `Dest` enum and a
simplified `Output` struct. These changes allow us to add new types of
inputs and output more easily.
2023-02-18 21:24:16 +01:00
Yang Hau
678a11dcf2 cksum: Implement option -a
Implement option -a --algorithm.
Move digest to src/uucore/src/lib/features and rename it to hash.

fix lint

fix Cargo.toml
2023-02-18 20:58:53 +08:00
Daniel Hofstetter
dcc7c4ed7b Use help_about! & adapt help files for its usage 2023-02-17 16:40:22 +01:00
Daniel Hofstetter
2c027a9312 uucore_procs: add help_about macro 2023-02-17 15:39:26 +01:00
Daniel Hofstetter
1ba0c6853c uucore_procs: drop need for "Usage" header in help 2023-02-17 14:51:40 +01:00
Daniel Hofstetter
94eddc4701 uucore_procs: separate file opening & parsing 2023-02-17 11:37:25 +01:00
Terts Diepraam
9fdce975fd
Merge pull request #4359 from dmatos2012/chmod-multiple-files-error
chmod: change permissions for files present even when there is a missing file
2023-02-17 11:27:32 +01:00
David Matos
946c8d2d4a chmod: change permissions for files present even when there is a missing file 2023-02-16 23:13:06 +01:00
Zaú Júlio
9e2c543cd4
mktemp: prefix prefix_of_template use to_string_lossy
Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
2023-02-16 18:43:32 -03:00
ZauJulio
af4ce911c8
mktemp: fix PrefixContainsDirSeparator verification 2023-02-16 17:48:23 -03:00
Joining7943
cca54089fb tail: Cargo.toml: Remove unneeded features of uucore and the nix dependency 2023-02-16 20:00:38 +01:00
Terts Diepraam
ff5000d4d0
Merge pull request #4239 from Joining7943/tail-fix-parsing-of-sleep-interval
`tail`: fix argument parsing of sleep interval
2023-02-16 15:14:53 +01:00
Sylvestre Ledru
d3fc0e8706
Merge pull request #4314 from cakebaker/comm_total_with_output_delimiter
comm: use delimiter on "total" line
2023-02-16 14:24:02 +01:00
Koki Ueha
5cc9130490 cat: move help strings to markdown file 2023-02-16 10:47:34 +00:00
papparapa
34e31f20e7
cp: move help strings to markdown file (#4372)
* cp: move help strings to markdown file

* cp: change markdown section order
2023-02-16 11:23:32 +01:00
Daniel Hofstetter
675c55ba01 stat: fix markdown formatting 2023-02-15 16:16:10 +01:00
Sylvestre Ledru
76034a8fe2
Merge pull request #4367 from cakebaker/replace_get_long_usage_fn_with_const
Replace get_long_usage fns with const
2023-02-15 08:18:36 +01:00
Terts Diepraam
df7fe29095
Merge pull request #4339 from howjmay/tr-newline
tr: Remove the extra newline in stderr
2023-02-14 22:58:40 +01:00
Guilherme A. de Souza
04b6d806a2
nproc: replace num_cpus crate with thread::available_parallelism (#4352)
* nproc: replace num_cpus crate with std:🧵:available_parallelism

* nproc: unwrap Result for Windows

* nproc: if thread::available_parallelism results in err return 1

* nproc: wrap the call to available_parallelism into a function

* nproc: remove comment in the wrong place

* nproc: fix style violation

* nproc: fix comment, refers to the new function
2023-02-14 22:43:09 +01:00
Yang Hau
ec81a23afc tr: Remove the extra newline in stderr
closes #4301
2023-02-15 02:04:43 +08:00
Daniel Hofstetter
99f3fc8356 Replace get_long_usage fns with const 2023-02-14 09:51:28 +01:00
Bart Massey
abc5cfb950 coreutils: fixed panic when multi-call binary has empty or non-UTF-8 name
The multi-call `coreutils` binary starts by trying to
convert its invocation path into a UTF-8 string, panicking
if this doesn't work.

This patch makes `coreutils` exit gracefully in this case.
2023-02-14 00:24:22 -08:00
Jeffrey Finkelstein
c6d9d7f11c Clippy fixes 2023-02-13 21:33:42 -05:00
Daniel Hofstetter
c433f8b475 uniq: remove suppression of use_self lint 2023-02-13 08:53:26 +01:00
Joining7943
0ed6a9f882 tail: Fix parsing of sleep interval. Use duration parser from fundu crate.
Activate tests for parsing sleep interval
2023-02-12 20:23:55 +01:00
Thayne McCombs
5b190dbf76 Stop saying --sparse is not implemented for cp
It is implemented, so update the --help text to reflect that
2023-02-12 01:41:36 -07:00
Terts Diepraam
bf8e9333f6 tee: use retain_mut from std instead of the deprecated retain_mut crate 2023-02-11 18:54:55 +01:00
Terts Diepraam
ae27c82020 Use workspace inheritance for dependencies 2023-02-11 18:54:46 +01:00
Terts Diepraam
d60fc40f2f Clippy fixes for MSRV 1.64 2023-02-11 13:59:50 +01:00
Yang Hau
0b1edd33fc rm: Remove remove_dir_all dependency
Closes #4335
2023-02-11 01:04:30 +08:00
Terts Diepraam
152be8527d update blake2_simd to 1.0.1
This fixes the duplicate constant-time-eq dependency.
2023-02-10 09:56:24 +01:00
Terts Diepraam
357001dabc fix double dependency of memoffset by upgrading nix, libc and ctrlc 2023-02-09 14:02:40 +01:00
Yang Hau
6299b418f5 typo 2023-02-09 00:33:54 +08:00
Daniel Hofstetter
d4cd4d310f ln: fix format of help text 2023-02-08 15:00:35 +01:00
Daniel Hofstetter
ba7a222a55 Start about texts with uppercase char 2023-02-07 14:54:25 +01:00
Daniel Hofstetter
a2796d4585 env: start about text with uppercase char 2023-02-07 10:20:04 +01:00
Daniel Hofstetter
ccf999473c comm: use delimiter on "total" line 2023-02-07 09:22:55 +01:00
Sylvestre Ledru
486defe893
Merge pull request #4313 from cakebaker/ptx_remove_unnecessary_join
ptx: fix warning from unnecessary_join lint
2023-02-05 21:23:36 +01:00
Daniel Hofstetter
ee261359bd ptx: fix warning from unnecessary_join lint 2023-01-30 10:11:40 +01:00
Sylvestre Ledru
00717a6440
Merge pull request #4308 from ctsk/chore/clippy-warnings
clippy: fix unnecessary return warnings
2023-01-30 09:25:20 +01:00
dependabot[bot]
204d96b7df
build(deps): bump regex from 1.7.0 to 1.7.1
Bumps [regex](https://github.com/rust-lang/regex) from 1.7.0 to 1.7.1.
- [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.7.0...1.7.1)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-30 06:13:54 +00:00
ctsk
ef32061f82 clippy: fix unnecessary return warnings 2023-01-29 22:09:11 +01:00
Sylvestre Ledru
efc70ade68
Merge pull request #4260 from sbentmar/expand-fix-perl-failures
expand: improve plus specifier handling
2023-01-28 18:15:08 +01:00
Sylvestre Ledru
d8c3205d4c
Merge pull request #4300 from cakebaker/comm_total
comm: implement --total
2023-01-28 18:14:17 +01:00
Sylvestre Ledru
a75cfd9655
Merge pull request #4171 from uutils/dependabot/cargo/blake3-1.3.2
build(deps): bump blake3 from 1.3.1 to 1.3.2
2023-01-28 01:16:04 +01:00
dependabot[bot]
423ff9fe8b build(deps): bump gcd from 2.1.0 to 2.2.0
Bumps [gcd](https://github.com/frewsxcv/rust-gcd) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/frewsxcv/rust-gcd/releases)
- [Commits](https://github.com/frewsxcv/rust-gcd/compare/2.1.0...2.2.0)

---
updated-dependencies:
- dependency-name: gcd
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-27 21:10:27 +01:00
Sylvestre Ledru
13fac01d31
Merge branch 'main' into dependabot/cargo/blake3-1.3.2 2023-01-27 21:10:06 +01:00
Sebastian Bentmar Holgersson
999957791a expand: minor simplification of mode logic 2023-01-27 21:08:16 +01:00
Sebastian Bentmar Holgersson
1bf723fe40 expand: fix formatting issues and cleanup 2023-01-27 21:08:16 +01:00
Sebastian Bentmar Holgersson
69d8729598 expand: replace while loop with constant time algorithm 2023-01-27 21:08:16 +01:00
Sebastian Bentmar Holgersson
ddc6fabca0 expand: all perl tests passing 2023-01-27 21:08:16 +01:00
Sebastian Bentmar Holgersson
cbab8677e6 expand: improve handing of + 2023-01-27 21:08:16 +01:00
TechHara
3ad36a49cb
cut: refactor (#4255)
refactors `cut field` logic to reduce code duplication by factoring out the common `Searcer`, which is _templatized_ on a specific `Matcher` -- `ExactMatcher` for an explicit delimiter and `WhitespaceMatcher` for white-space delimiter.

before
- code duplication in `Searcher` and `WhitespaceSearcher`
- code duplication in `cut_fields` and `cut_fields_whitespace`

after
- two versions of `Matcher`s
- one `Searcher`
- simplify `cut_fields` by delegating actual work to specific functions
2023-01-27 21:07:36 +01:00
Daniel Hofstetter
f6b646e4e5 clippy: fix warnings introduced with Rust 1.67.0 2023-01-27 17:37:56 +01:00
Daniel Hofstetter
b06485990d comm: implement --total 2023-01-24 16:49:43 +01:00
Sylvestre Ledru
dce8a021da
Merge pull request #4299 from Joining7943/fix-4298-build-fails-on-s390x-and-risc64
`uucore`: Fix #4298: Fails to build on s390x (and riscv64)
2023-01-24 11:47:20 +01:00
Joining7943
9796e70a28 uucore: Fix #4298: Build on s390x and riscv64 architectures fails 2023-01-23 21:13:59 +01:00
Sylvestre Ledru
2df4aaccd9
Merge pull request #4263 from cakebaker/od_cleanup_format_strings
od: remove "width = width" from format strings
2023-01-22 21:32:59 +01:00
Sylvestre Ledru
6f95f0953b
Merge pull request #4271 from eds-collabora/eds/nice
Support legacy argument syntax for nice
2023-01-22 20:57:08 +01:00
Sylvestre Ledru
f30124e497 uname: use the same version of platform-info as arch 2023-01-21 23:24:53 +01:00
Terts Diepraam
4d3dc78686 Version 0.0.17 2023-01-21 10:38:18 +01:00
Emil Suleymanov
50c1833c11
cp: require preserve only certain attributes (#4099)
* cp: require preserve only certain attributes

# Conflicts:
#	src/uu/cp/src/copydir.rs
#	src/uu/cp/src/cp.rs

* tests/cp: preserve all and preserve xattr tests with todos

* tests/cp: rename preserve tests

* tests/cp: add android fail test for preserve=xattr

On Android, this cp with explicit preserve of xattr must fail, because of the limitations of the filesystem setup used on Android.

* cp: verify some metadata in cp preserve tests

# Conflicts:
#	tests/by-util/test_cp.rs

* cp: run test_cp_preserve_all in all OS's but only check metadata on linux

* test/cp: don't expect the mode to change in explicit cp preserve

* cp: attributes struct instead of enum for unified required tracking

* cp: refactor preserver and handle_preserve

# Conflicts:
#	src/uu/cp/src/cp.rs

* cp: update preserve attr to max

* test/cp: fix the preserve xattr test

Access timestamps appear to be modified only in this test. Running the command directly does not alter the access timestamp.

* cp/test: preserve all and context case

* cp: fix preserve args value source

* test/cp: don't check mtime on freebsd

* test/cp: don't check mtime on macos

* test/cp: fix freebsd deps

* test/cp: support freebsd tests

* cp: simplify try_set_from_string

* cp: parse context attr in preserve in any case to show warning later

* cp: print warnings for attribute errors if not required

* cp: show SELinux warning only once

* cp: show SELinux warning without error

* Revert "cp: show SELinux warning without error"

This reverts commit d130cf0d8c8e28ac2c903413992613241decf879.

* cp: add documentation for preserve components

* cp: simplify try_set_from_string

* cp: EN_US "behavior" spelling for cspell
2023-01-19 13:02:06 +01:00
Ed Smith
34e10f9aa8 nice: Remove use of show_warning
This is required to pass the GNU nice test suite. Failure to produce
the advisory message when unable to change the process priority must
be fatal, and without this commit our version of nice will exit, but
before the commit the exit code will be 101 (due to eprintln!
panicking), and it must be 125 to pass the test suite.

Signed-off-by: Ed Smith <ed.smith@collabora.com>
2023-01-18 11:44:41 +01:00
Ed Smith
07e7372311 nice: Permit --adjustment to be specified multiple times
This is tested by the GNU coreutils test suite, and the
correct behaviour is the last specification wins.

Signed-off-by: Ed Smith <ed.smith@collabora.com>
2023-01-18 11:44:41 +01:00
Ed Smith
8aa9f346ef Support legacy argument syntax for nice
This introduces an argument preprocessing step for the nice tool in
order to support the legacy nice adjustment syntax (`nice -1 foo`,
`nice --1 foo`, `nice -+1 foo` and so forth).

This is a preprocessing step because the interaction between these
arguments and the existing `nice -n -1` syntax becomes context
dependent, in a way that is currently difficult to capture through
clap.

Signed-off-by: Ed Smith <ed.smith@collabora.com>
2023-01-18 11:44:41 +01:00
Sylvestre Ledru
8c137f5d7c
Merge pull request #4278 from cakebaker/sum
sum: fix output when using BSD sum algo (-r)
2023-01-18 11:33:41 +01:00
Sylvestre Ledru
afbe850115
Merge pull request #4279 from rivy/up.uname
change/uname ~ update and revise
2023-01-18 11:33:29 +01:00
Sylvestre Ledru
f12202e39c
Merge pull request #4281 from cakebaker/default_trait_access
clippy: use type name instead of Default::default
2023-01-18 11:33:09 +01:00
Daniel Hofstetter
3489647407 cp: remove empty line from version output 2023-01-18 10:20:17 +01:00
Daniel Hofstetter
e09d718ca7 join: remove NAME constant 2023-01-17 16:10:32 +01:00
Daniel Hofstetter
f50c352adc clippy: use type name instead of Default::default 2023-01-16 10:52:28 +01:00
Roy Ivy III
03e55d2ecb docs ~ update spell-checker exceptions 2023-01-14 22:53:26 -06:00
Roy Ivy III
ead457171b refactor/uname ~ rename vars to standards 2023-01-14 22:53:26 -06:00
Roy Ivy III
759f32fe4f fix/uname ~ correct --all help description 2023-01-14 22:53:25 -06:00
Roy Ivy III
b5eaa8822f fix/uname ~ strip any trailing NUL(s) from nodename() (from bug in platform-info) 2023-01-14 22:53:25 -06:00
Roy Ivy III
27d20129fe fix/dd ~ correct usage error display text 2023-01-13 22:14:48 -06:00
Roy Ivy III
3d93e25160 fix/touch ~ correct usage error display text 2023-01-13 22:14:48 -06:00
Roy Ivy III
10f35fc282 refactor/uname ~ use platform_info-v1.0.2 2023-01-13 22:13:26 -06:00
Daniel Hofstetter
747bc2513e sum: fix output when using BSD sum algo (-r) 2023-01-13 10:05:09 +01:00
Sylvestre Ledru
6a9660f9f6
Merge pull request #4268 from rivy/fix.sleep
Fix `sleep` argument parsing and errors
2023-01-12 18:41:04 +01:00
Sylvestre Ledru
22821c8ac6
Merge pull request #4272 from cakebaker/mv_remove_unnecessary_not
mv: remove unnecessary "!"
2023-01-12 18:32:31 +01:00
Daniel Hofstetter
74ed737460 remove NAME constants 2023-01-12 15:21:11 +01:00
Sylvestre Ledru
74c9abb359
Merge pull request #4274 from cakebaker/sum_fix_output_of_about_string
sum, unexpand: fix output of about string
2023-01-11 16:33:39 +01:00
Daniel Hofstetter
5ad3cbe965 unexpand: fix output of about string 2023-01-11 15:55:37 +01:00
Daniel Hofstetter
0f79b3cf2d sum: fix output of about string 2023-01-11 14:44:59 +01:00
Sylvestre Ledru
46cac1145b
Merge pull request #4273 from cakebaker/pr_help_output
pr: add missing '\' before line breaks
2023-01-11 14:16:05 +01:00
Terts Diepraam
9ccfb025cf
Merge pull request #4264 from cakebaker/pr_seq_simplify_format_strings
pr,seq: simplify format strings
2023-01-11 13:17:13 +01:00
Daniel Hofstetter
073e6c8f62 pr: add missing '\' before line breaks 2023-01-10 10:55:36 +01:00
Daniel Hofstetter
aff18258e9 mv: remove unnecessary "!" 2023-01-09 09:38:37 +01:00
Roy Ivy III
5abeb012e8 fix/sleep: improve match of error output to GNU practices 2023-01-08 12:10:32 -06:00
Daniel Hofstetter
fe9779261f csplit: rename var to simplify format strings 2023-01-07 15:05:34 +01:00
Daniel Hofstetter
cc1f109906 pr,seq: simplify format strings 2023-01-06 10:39:43 +01:00
Daniel Hofstetter
83f76c514a od: remove "width = width" from format strings 2023-01-06 09:32:23 +01:00
Daniel Hofstetter
212ad777fc pr: remove commented out code line 2023-01-04 15:20:45 +01:00
Terts Diepraam
36f3507bed
Merge pull request #4232 from TechHara/whitespace
cut: add whitespace option for separating fields
2023-01-01 12:58:28 +01:00
Roy Ivy III
8753fb95c3 fix/expr: EXIT_CODE=1 for any return output parsable to 0 (or empty) 2022-12-29 22:49:02 -06:00
Roy Ivy III
fe954e5825 fix/expr: repair off-by-1 index operator error 2022-12-29 22:49:02 -06:00
dependabot[bot]
278e21b81b build(deps): bump blake3 from 1.3.1 to 1.3.2
Bumps [blake3](https://github.com/BLAKE3-team/BLAKE3) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/BLAKE3-team/BLAKE3/releases)
- [Commits](https://github.com/BLAKE3-team/BLAKE3/compare/1.3.1...1.3.2)

---
updated-dependencies:
- dependency-name: blake3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-26 10:25:33 +01:00
trasua
ef8f92f720 uucore: add options to parse_size::Parser to support parse_byte_count() in sort.rs 2022-12-26 10:23:20 +01:00
jaggededgedjustice
b8a755a396
date: Catch panic from invalid format string (#4240)
* Catch panic from invalid date string
2022-12-25 21:11:34 +01:00
TechHara
276b115c02 remove clippy allow; fmt 2022-12-23 09:56:21 -05:00
TechHara
20761fe422 simplify 2022-12-23 02:18:16 -05:00
TechHara
a53dcba6d3 mark fixme item -- use char for delimiter 2022-12-22 21:38:47 -05:00
TechHara
a549589682 fix clippy warnings 2022-12-21 08:01:31 -05:00
TechHara
f2a7175144 enum Delimiter; misc changes 2022-12-20 20:37:31 -05:00
Daniel Hofstetter
a0522f5cbd clippy: fix some "unnested or-patterns" warnings 2022-12-20 16:07:37 +01:00
TechHara
c29839f4f9 Merge branch 'main' into whitespace 2022-12-18 09:07:03 -05:00
TechHara
df8ce0c999 ignore multispace cspell 2022-12-18 09:06:47 -05:00
Joining7943
ca0414d867 clippy: Allow some unnecessary casts 2022-12-16 18:37:50 +01:00
Joining7943
c94a039358 clippy and doc: Fix warnings, mostly needless conversions. Fix documentation warning. 2022-12-16 18:36:27 +01:00
TechHara
bae78e62e0
Merge branch 'main' into whitespace 2022-12-15 22:23:03 -05:00
Sylvestre Ledru
c5728a61b4
fix some clippy warnings (#4229)
* fix some clippy warnings

* Fix the last two
2022-12-14 15:42:07 +01:00
Terts Diepraam
e4bed1c087
Merge pull request #4135 from Joining7943/refactor-tail-check-warnings
`tail`: Refactor handling of warnings and early exits
2022-12-14 13:21:54 +01:00
TechHara
4e2cfdb8ce add more comments 2022-12-14 04:07:12 -05:00
TechHara
76f818da05 fix whitespace 2022-12-13 21:02:16 -05:00
TechHara
27dfe63f4c add comments on the function logic 2022-12-13 20:57:46 -05:00
TechHara
db829321fc remove clippy complex 2022-12-13 11:51:05 -05:00
TechHara
5867a47f21 fix clippy complaint 2022-12-13 11:49:26 -05:00
TechHara
17c48e13f4 specify that cut -w is freebsd extension 2022-12-13 11:30:58 -05:00
TechHara
866a6d25c8 fix clippy complaint 2022-12-13 11:20:34 -05:00
Joining7943
b339f6d80c tests/tail: Add all additional tests written during refactoring tail from tip of refactoring branch
Other changes summmary:
* Use module level imports instead of fully qualified imports where appropriate
* Fix intermittent failing test_positive_zero_bytes because of broken pipe
* Cleanup old disabled test for warning of following indefinitely
2022-12-13 16:16:14 +01:00
Joining7943
93654d4504 tail: Add documentation for Settings::check_warnings and Settings::verify 2022-12-13 16:16:14 +01:00
Joining7943
2dc8a1b55e tail: Add gnu's warning when following stdin is ineffective. If no pid support set to 0 in Observer. 2022-12-13 16:16:14 +01:00
Joining7943
d57545d09c tail: Refactor: Handle warnings and early exits in one place. Remove InputService ...
Other changes summary:
* Cleanup imports
* Remove stdin_is_pipe_of_fifo function
* Rename WatcherService to Observer
2022-12-13 16:16:08 +01:00
Terts Diepraam
69caa45b01
Merge pull request #4219 from cakebaker/match_wildcard_for_single_variant
chore: fix wildcards that match single variant
2022-12-13 11:57:52 +01:00
Christian
00bbe24639
mv: add progress bar (#4220)
* mv: add progress bar

Similarly to `cp`, adds `-g` and `--progress` flags to enable a progress
bar via indicatif.
2022-12-13 11:46:54 +01:00
TechHara
188d84b154 minimize unnecessary code change 2022-12-13 01:14:14 -05:00
TechHara
f334ae3149 use match guard to minimize 2022-12-13 01:10:48 -05:00
TechHara
50c8bd4c6b fix 2022-12-13 00:48:17 -05:00
TechHara
21cf0b41ab add clippy 2022-12-13 00:11:01 -05:00
TechHara
1cc3f331e7 format 2022-12-12 22:29:31 -05:00
TechHara
6516519af3 Merge branch 'main' into whitespace 2022-12-12 22:07:05 -05:00
Sylvestre Ledru
f9c0ca4383
Merge pull request #4184 from jfinkels/cp-verbose
cp: correct --verbose --parents output for both files and directories
2022-12-12 21:31:15 +01:00
Sylvestre Ledru
c78e077ff2
Merge pull request #4194 from jfinkels/dd-single-byte-written
dd: correct progress line if 1 byte written
2022-12-12 21:30:10 +01:00
TechHara
f6a0abaee3 add whitespace delimiter option 2022-12-12 12:00:57 -05:00
Daniel Hofstetter
81243db948 chore: fix wildcards that match single variant 2022-12-06 10:50:34 +01:00
ctsk
8a837dae21 Tick after creating progress bar to draw it 2022-12-06 10:36:52 +01:00
Kai M
42b9b7b62c
install: fix issue #3814 (#3950)
* install: fix installing one file when using -Dt options

* install: fix installing multiple files with -Dt

Code was missing the logic to create the target dir when multiple files
should be copied and target dir is given by -t option.
This simplifies the copy logic also when only one file should be copied
to the target dir.

* install: fix verbose output when using -D

Also adds a unit test to verify the same behaviour as the gnu tools.

* install: add more testcases for create leading dir

Tests various combinations of "-D" with and w/o "-t" when installing
either a single file or multiple files into a non existing directory.

  install -D file1 file2 (-t) not_existing_dir
  install -D file1 (-t) not_existing_dir/

Also fixes file formatting, spelling and adds some more test asserts.

* install: fix error for nonex. dir path ending on /

The install command failed with a different error message than the
original GNU install tool. Checking for a trailing slash fixes this.
Only works on unix though.

* install: add windows support when checking for '/'

* install.rs: fix spelling

* install.rs: add more tests regarding omitting dir

This increases the CI test coverage and also checks for more corner
cases to ensure uu_install is compliant with GNU's original.

    export C=coreutils/target/debug/

    rm -rf dir1 no-dir2 dir3 file
    mkdir -p dir1 dir3
    touch file

    ${C}install dir1/file1 dir1/.. no-dir2
    ${C}install dir1/file1 dir1/.. dir3
    ${C}install dir1/.. dir3

* install: improve test_install_missing_arguments

Also check that install returns the correct error messages, when only a
target directory is given via -t and that is is not created (-D option).

* install: rework the checks for missing file args

This ensures correct (GNU install like) behavior. Tests from the last
commit will pass now.
2022-12-06 09:11:23 +01:00
Sylvestre Ledru
24340665ee
Merge pull request #4216 from jfinkels/cp-preserve-hardlinks-readability
cp: improve readability of preserve_hardlinks()
2022-12-06 08:44:44 +01:00
Jeffrey Finkelstein
54a36df9ab dd: correct progress line if 1 byte written
Correct the progress report written by `dd` if exactly one byte is
written so that it says "1 byte" instead of "1 bytes".
2022-12-05 21:41:26 -05:00
Jeffrey Finkelstein
1a839fb2c4 cp: correct --verbose --parents output for dirs
This commit corrects the behavior of `cp -r --parents --verbose` when
the source path is a directory, so that it prints the copied ancestor
directories. For example,

    $ mkdir -p a/b/c d
    $ cp -r --verbose --parents a/b/c d
    a -> d/a
    a/b -> d/a/b
    'a/b/c' -> 'd/a/b/c'
2022-12-05 21:37:13 -05:00
Jeffrey Finkelstein
bd665ea44a cp: correct --verbose --parents output for files
This commit corrects the behavior of `cp --parents --verbose` when the
source path is a file so that it prints the copied ancestor
directories. For example,

    $ mkdir -p a/b d
    $ touch a/b/c
    $ cp --verbose --parents a/b/c d
    a -> d/a
    a/b -> d/a/b
    'a/b/c' -> 'd/a/b/c'

Fixes #3332.
2022-12-05 21:36:56 -05:00
Jeffrey Finkelstein
92e1bb98fe cp: improve readability of preserve_hardlinks()
Improve readability of the `preserve_hardlinks()` helper function by
reducing levels of nesting in the body of the function and making it
return a Boolean rather than mutating a Boolean argument.
2022-12-05 21:28:22 -05:00
Sylvestre Ledru
b7925465a8 factor: trim the input to fix some busybox results 2022-12-05 22:49:48 +01:00
Jeffrey Finkelstein
682667fd1d cp: force link between two files that exist
Allow `cp` to link files that exist. For example,

    $ touch src dest
    $ cp -f --link src dest

Before this commit, an error was raised.
2022-12-04 19:36:05 -05:00
Jeffrey Finkelstein
6167de903e cp: restrict permissions when copying FIFO
When copying the contents of a named pipe (also known as a FIFO) via

    cp --preserve=ownership --copy-contents fifo fifo-copy

limit the permissions of the destination file while the contents are
being copied, and then restore the permissions to match those of the
source FIFO when all contents have been copied successfully.
2022-12-03 18:30:47 -05:00
Jeffrey Finkelstein
3a5b31a30f dd: correct rendering of SI and IEC byte counts
Adjust the rendering of the concise byte counts in both SI and IEC
units to better match the behavior of GNU dd.

Before this commit,

    $ 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

After this commit,

    $ head -c 1024 /dev/zero | dd > /dev/null
    2+0 records in
    2+0 records out
    1024 bytes (1.0 kB, 1.0 KiB) copied, 0.0 s, 1.0 MB/s

For comparison, GNU dd produces the following:

    $ head -c 1024 /dev/zero | dd > /dev/null
    2+0 records in
    2+0 records out
    1024 bytes (1.0 kB, 1.0 KiB) copied, 0.000332864 s, 3.1 MB/s
2022-12-03 10:14:00 -05:00
Sylvestre Ledru
3880b463fe
Merge pull request #4185 from jfinkels/uucore-sprintf-2
uucore: add sprintf() function
2022-12-03 10:21:09 +01:00
Sylvestre Ledru
818012e30b
Merge pull request #4193 from jfinkels/touch-relative-time
touch: add support for some relative times
2022-12-03 10:16:21 +01:00
Sylvestre Ledru
8e5d374ec2
Merge pull request #4197 from tertsdiepraam/cleanup-uucore-process
`uucore/process`: remove custom `ExitStatus`
2022-12-03 10:15:48 +01:00
Jeffrey Finkelstein
66ee373373 cp: preserve hard links when target already exists
Prevent a panic in `cp -a` when the target of a hard link already
exists in the target directory structure.

For example,

    $ mkdir -p src dest/src
    $ touch src/f dest/src/f
    $ ln src/f src/link
    $ cp -a src dest

The `cp` command now succeeds without error.
2022-12-02 23:50:18 -05:00
Terts Diepraam
dc828fed2d uucore/process: remove custom ExitStatus 2022-12-02 12:25:14 +01:00
Sylvestre Ledru
3ca6139e0f
Merge pull request #4158 from tertsdiepraam/markdown-in-docs-v1
Markdown in docs v1
2022-12-02 09:39:33 +01:00
Jeffrey Finkelstein
d083fa19c2 uucore: add sprintf() function
Add an `sprintf()` function (and `printf()` function) to
`uucore::memo`.  The `sprintf()` function behaves roughly like the
standard Rust `format!()`, but follows our implementation of the GNU
`printf` formatting logic instead.
2022-12-02 07:48:36 +01:00
Sylvestre Ledru
403780a613
Merge pull request #4196 from cakebaker/cut_remove_unnecessary_return_type
cut: remove unnecessary return type
2022-12-02 07:47:49 +01:00
Daniel Hofstetter
6cc470920f numfmt: derive default impl for FormatOptions 2022-12-01 13:49:23 +01:00
Daniel Hofstetter
9a2174ba02 chore: standardize creation of empty strings 2022-12-01 13:49:23 +01:00
Terts Diepraam
efa0fd498b
Merge pull request #4179 from djedi23/verbose_and_progress
Suspend the progress bar before printing the copied files.
2022-11-30 13:19:58 +01:00
Sylvestre Ledru
033969cf8f
Merge pull request #4181 from cakebaker/split_backticks_are_unbalanced
split: fix "backticks are unbalanced" warnings
2022-11-30 08:38:30 +01:00
Terts Diepraam
b632ba8ff6 numfmt: update help to markdown syntax 2022-11-29 22:54:41 +01:00
Terts Diepraam
bcf3b852c6 expr: update help to markdown syntax 2022-11-29 22:54:41 +01:00
Terts Diepraam
e155a5ea6d uudoc: support after_help and read directly from markdown file 2022-11-29 22:54:41 +01:00
Moïse Valvassori
8b30ead588 add comment to the pregress bar suspension. 2022-11-29 22:54:07 +01:00
Moïse Valvassori
1b004053ac Suspend the progress bar before printing the copied files. 2022-11-29 22:54:07 +01:00
Daniel Hofstetter
ac1790c69e split: fix "backticks are unbalanced" warnings 2022-11-29 22:53:56 +01:00
Jeffrey Finkelstein
9632db4f86 dd: correctly set file size when conv=sparse
Before this commit, if `sparsefile` were a regular file of non-zero
size whose contents are all null bytes, then

    dd if=sparsefile of=outfile conv=notrunc

would have resulted in `outfile` having zero size as reported by
`stat`. After this commit, `outfile` will have the same size as
`sparsefile` (even if the contents are represented sparsely by the
filesystem).
2022-11-29 22:53:18 +01:00
Jeffrey Finkelstein
a396ebd883 touch: add support for some relative times
For example,

    $ touch -d +1 days

Fixes #3964.
2022-11-29 22:53:13 +01:00