Commit graph

5496 commits

Author SHA1 Message Date
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
Daniel Hofstetter
be7717b2d0 cut: remove unnecessary return type 2022-11-29 22:52:58 +01:00
Sylvestre Ledru
af804df9a2
Merge pull request #4166 from miles170/issue-4080-cp-fails-on-mac
cp: fix `cp --force --backup f f` fails on macOS
2022-11-21 21:13:35 +01:00
Sylvestre Ledru
edc08f59fb update lscolors to switch to nu_ansi_term 2022-11-20 13:46:02 +01:00
Miles Liu
3896aa31be
cp: fix cp --force --backup f f fails on macOS 2022-11-20 18:14:42 +08:00
Jeffrey Finkelstein
903ad1656d dd: move tests of slow reader to test_dd.rs
Move some tests that simulate a slow reader from `dd.rs` to
`tests/by-util/test_dd.rs`, and employ a FIFO and `sleep()` to
simulate the slow reader instead of a custom struct that implements
`Read`. This change restricts the type of `Input`s the
`Output::dd_out()` function can accept, facilitating a future change
to make `Input` an enum.
2022-11-19 09:27:23 -05:00
Terts Diepraam
5acb0227aa
Merge pull request #4134 from jfinkels/dd-output-enums
dd: create Dest enum and simpler Output struct
2022-11-19 14:52:46 +01:00
Terts Diepraam
1b35e467ac
Merge pull request #4137 from jfinkels/dd-bytes-suffix
dd: allow B as a suffix for count, seek, and skip
2022-11-19 12:23:43 +01:00
Miles Liu
b2b3512749
stat: remove unused import 2022-11-19 17:37:59 +08:00
Sylvestre Ledru
6d7850549b
Merge pull request #4150 from tertsdiepraam/stat-refactor
`stat` refactor
2022-11-19 09:57:23 +01:00