Daniel Hofstetter
ec27a074c0
uucore: don't show error for ambiguous value
...
that's a direct match in ShortcutValueParser
2023-08-01 08:39:05 +02:00
Daniel Hofstetter
a9dde668ca
Merge pull request #5115 from resistor/rotate
...
Use `rotate_right` rather than an explicit expansion in `sum`
2023-07-29 16:42:45 +02:00
Daniel Hofstetter
5c65f44957
Merge pull request #5116 from simon04/patch-1
...
tsort: use Iterator.all
2023-07-29 07:50:38 +02:00
John Shin
426cce7df0
rmdir: use is_empty()
2023-07-28 17:10:36 -07:00
John Shin
0d56792c58
mv: use is_empty()
2023-07-28 17:09:23 -07:00
Simon Legner
24319791ec
tsort: use Iterator.all
2023-07-28 21:25:11 +02:00
Owen Anderson
e9f89c46e0
Use rotate_right
instead of explicit expansion.
2023-07-27 23:43:16 -06:00
Terts Diepraam
c2997718cd
touch: move from time to chrono
...
This allows us to work with daylight savings time which is necessary to enable one of the tests. The leap second calculation and parsing are also ported over. A bump in the chrono version is necessary to use NaiveTime::MIN.
2023-07-27 17:06:38 +02:00
Sylvestre Ledru
4004281f34
Merge pull request #5100 from cakebaker/nl_shorten_enum_variants
...
nl: shorten variants of NumberingStyle enum
2023-07-25 20:18:55 +02:00
Sylvestre Ledru
9449eda51d
Merge pull request #5103 from cakebaker/nl_join_blank_lines_show_error_if_zero
...
nl: show error if --join-blank-lines is zero
2023-07-25 20:18:43 +02:00
Daniel Hofstetter
fe9ec37141
uucore: use "workspace=true" for some dependencies
2023-07-22 16:14:32 +02:00
Sylvestre Ledru
e77a1bf54c
Merge pull request #4342 from tmccombs/mktemp-req-equals
...
Require = for --tmpdir in mktemp
2023-07-21 14:36:25 +02:00
Daniel Hofstetter
d40a25db5d
csplit: remove explicit "into_iter()"
2023-07-21 10:52:03 +02:00
Daniel Hofstetter
aef130dae7
nl: show error if --join-blank-lines is zero
2023-07-20 15:26:46 +02:00
Daniel Hofstetter
013e94522e
nl: shorten variants of NumberingStyle enum
2023-07-20 09:45:21 +02:00
Daniel Hofstetter
d7d2ad52db
nl: fix zero padding of negative line numbers
2023-07-19 16:22:53 +02:00
Sylvestre Ledru
e15e03a2bf
Merge pull request #5091 from cakebaker/nl_fix_output_of_line_numbers
...
nl: fix calculation of line number lengths
2023-07-19 15:39:35 +02:00
Sylvestre Ledru
0126f20926
Merge pull request #5089 from cakebaker/cat_remove_long_version_of_t_arg
...
cat: remove --t
2023-07-18 19:35:06 +02:00
Daniel Hofstetter
cf29f3f452
Merge pull request #5093 from sylvestre/fix-man-coreutils
...
Improve the coreutils manpage
2023-07-18 15:13:39 +02:00
Thayne McCombs
6262a3e9d9
Add tests for mktemp tmpdir flags
...
And set overrides_with for tmpdir flags.
Tests were copied from #4275
Co-authored-by: David Matos <davidmatos06@gmail.com>
2023-07-18 12:46:05 +02:00
Thayne McCombs
b77a08c134
Require = for --tmpdir in mktemp
...
Fixes #3454
This implementation more closely matches the behavior of GNU mktemp. Specifically,
if using the short-form `-p`, then DIR is required, and if using the long form `--tmpdir`
then DIR is optional, but if provided, must use the `--tmpdir=DIR` form (not `--tempdir DIR`),
so that there is no ambiguity with also passing a TEMPLATE.
The downside to this implementation is we are now introducing a new workaround for
https://github.com/clap-rs/clap/issues/4702 where we use separate calls to `.arg()` for
the short `-p` and the long `--tmpdir`, which results in a less than ideal output for `--help`.
2023-07-18 12:46:05 +02:00
Daniel Hofstetter
27ee279913
nl: fix calculation of line number lengths
2023-07-18 09:30:23 +02:00
Sylvestre Ledru
83c8517142
coreutils multicall: the manpage subcommand doesn't display the right command
...
see https://manpages.debian.org/unstable/rust-coreutils/rust-coreutils.1.en.html
2023-07-17 22:46:34 +02:00
Tuomas Tynkkynen
96dbd6d386
stty: Implement printing assignment of control chars
...
Part of #3861 .
Code comments from sylvestre.
Co-authored-by: Sylvestre Ledru <sledru@mozilla.com>
2023-07-16 17:49:23 +03:00
Daniel Hofstetter
373035fa08
cat: remove --t
2023-07-16 16:48:01 +02:00
Sylvestre Ledru
78fed70982
Merge pull request #5078 from cakebaker/nl_allow_negative_values_for_i_and_v
...
nl: allow negative values for --line-increment and --starting-line-number
2023-07-15 00:21:51 +02:00
Sylvestre Ledru
6f67c90032
Merge pull request #5081 from cakebaker/ci_add_default_trait_access_lint
...
ci: add default_trait_access lint and fix its warnings
2023-07-15 00:20:53 +02:00
Daniel Hofstetter
424d51285c
clippy: fix default_trait_access lint warnings
2023-07-14 13:41:06 +02:00
Sylvestre Ledru
74530c0f51
Update the version to 0.0.20
2023-07-14 13:04:17 +02:00
Daniel Hofstetter
388f249716
nl: allow negative values for -i and -v
2023-07-14 12:31:17 +02:00
Daniel Hofstetter
5d03d2d9d4
clippy: fix warnings introduced by Rust 1.71.0
2023-07-13 17:35:33 +02:00
Sylvestre Ledru
1897c18e88
Merge pull request #5073 from cakebaker/nl_add_test_for_number_separator
...
nl: add test for "--number-separator"
2023-07-12 22:42:01 +02:00
Rayhan Faizel
504b9e15a0
Clamp overflowing values in --width to maximum
2023-07-12 23:23:58 +05:30
Daniel Hofstetter
20b1f11daa
nl: add test for "--number-separator"
...
and replace "match" with "if let"
2023-07-12 15:25:02 +02:00
Daniel Hofstetter
826adc62aa
nl: show error if --number-width is zero
...
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2023-07-11 17:45:53 +02:00
Sylvestre Ledru
8e8b825b45
Merge pull request #5063 from cakebaker/nl_use_value_parser_for_number_format
...
nl: use value parser for "--number-format"
2023-07-11 17:10:20 +02:00
Daniel Hofstetter
eb2123ee15
nl: add "after help"
2023-07-11 14:26:54 +02:00
Daniel Hofstetter
cb50208909
nl: use value parser for "--number-format"
2023-07-10 11:20:37 +02:00
John Shin
e5331e3abb
Merge branch 'main' into ls-version-cmp
2023-07-09 14:36:46 -07:00
Daniel Hofstetter
f67ef7fb11
nl: change value name to match help text
2023-07-09 16:08:38 +02:00
Daniel Hofstetter
f8a955266e
Merge pull request #4750 from NikolaiSch/seq-panic-fix
...
fix: seq panic on no arguments #4749
2023-07-09 14:19:07 +02:00
Daniel Hofstetter
0b37b63ea3
Merge pull request #5055 from yt2b/ls_literal_option
...
ls: --l should output the same as --literal
2023-07-09 14:07:24 +02:00
Sylvestre Ledru
10bca71b09
Merge branch 'main' into ls-version-cmp
2023-07-09 09:24:39 +02:00
Sylvestre Ledru
78fd0efab9
Merge pull request #5013 from shinhs0506/core-version-cmp
...
uucore: leading zeros are ignored in version compare
2023-07-09 09:21:18 +02:00
Daniel Hofstetter
6f91371e61
touch: accept "modify" & "mtime" for --time arg
2023-07-08 16:13:35 +02:00
Terts Diepraam
24c2743e10
Merge pull request #5053 from dezgeg/stty-baudrate
...
stty: Support setting baud rate
2023-07-08 13:27:56 +02:00
Tuomas Tynkkynen
bde9030e4e
stty: Support setting baud rate
...
Part of #3859 .
2023-07-08 11:46:16 +03:00
yt2b
cf6f7856e4
ls: fix --l option
2023-07-08 10:43:20 +09:00
Tuomas Tynkkynen
85b9b61dd8
stty: Finish '--save' support
...
Argument parsing for this exists, but the option doesn't change output
in any way. Finish the support.
Closes #3862
2023-07-08 02:24:26 +03:00
Daniel Hofstetter
ac4ff2ac0e
seq: simplify error handling
...
Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
2023-07-06 10:26:29 +02:00
John Shin
844cbdc5a4
sort: add tests for stable and unstable sort
2023-07-05 10:05:52 +02:00
John Shin
e9405250f4
uucore: leading zeros are ignored in version compare
2023-07-05 10:05:52 +02:00
Daniel Hofstetter
4a192e98d5
Merge pull request #5032 from sylvestre/split-fail
...
split: reject some invalid values
2023-07-05 07:04:22 +02:00
John Shin
4acd02c7a1
ls: string compare if version_cmp returns equal
2023-07-04 16:08:54 -07:00
Sylvestre Ledru
9d44d8b71d
Merge pull request #4977 from cakebaker/date_shortcut_value_parser
...
date: use custom value parser
2023-07-04 19:56:46 +02:00
Sylvestre Ledru
264d29a169
fix the clippy warning
2023-07-04 18:45:11 +02:00
Terts Diepraam
c455aa0922
Merge pull request #5036 from cakebaker/nl_fix_no_renumber
...
nl: make -p/--no-renumber a flag
2023-07-04 14:16:04 +02:00
Daniel Hofstetter
fee5225cb6
nl: make --no-renumber a flag
2023-07-04 10:37:10 +02:00
Daniel Hofstetter
18e5c5b5f7
numfmt: remove duplicate info from help output
2023-07-04 07:02:18 +02:00
Sylvestre Ledru
d033db3573
split: reject some invalid values
...
Matches what is done in tests/split/fail.sh
(still doesn't work)
2023-07-03 22:57:37 +02:00
Sylvestre Ledru
37cbfd1efd
Merge pull request #5030 from cakebaker/touch_use_parse_datetime
...
touch: use parse_datetime instead of humantime_to_duration
2023-07-03 16:26:51 +02:00
Daniel Hofstetter
11b098fce1
Merge pull request #5028 from sylvestre/cp-multiple
...
cp: allow multiple usages of -R - Closes : #5027
2023-07-03 16:09:45 +02:00
Sylvestre Ledru
e491bbdbed
cp: allow multiple usages of -R/-r Closes : #5027
...
works for all other rm args
2023-07-03 14:19:45 +02:00
Roy Ivy III
af64bde92b
fix/touch ~ time crate usage errors
2023-07-03 14:15:15 +02:00
Sylvestre Ledru
7a7842b5b8
Merge pull request #4756 from Joining7943/tail-refactor-and-fix-input
...
`tail`: Refactor `paths::Input::from` and `Settings::inputs`
2023-07-03 14:09:57 +02:00
Roy Ivy III
9aef5ac35b
deps ~ change from 'humantime_to_duration' to 'parse_datetime'
2023-07-03 13:53:52 +02:00
Terts Diepraam
5a667db43d
tail: clean up some small things in input parsing
2023-07-03 13:20:48 +02:00
sbentmar
42bf580f13
numfmt: add --invalid option ( #4249 )
...
* numfmt: add invalid option
* numfmt: return code 0 if ignore or warn
* numfmt: implement all --invalid modes
* numfmt: validate stdout and stderr
* numfmt: remove unnecessary code
* numfmt: apply formatting
* numfmt: fix clippy issues
* numfmt: fix failing test cases
* numfmt: fix formatting
* numfmt: fix bug when handling broken pipe
* numfmt: fix bug where extra newline was added
* numfmt: add test cases for edge cases
* numfmt: simplify error handling
* numfmt: remove redundant if
* numfmt: add newline between functions
* numfmt: fix failing test cases
* numfmt: add support for arg numbers using --invalid
* numfmt: simplify error handling in value handlers
* numfmt: fix merge conflict and align prints
* numfmt: fix clippy suggestion
* numfmt: replace "valid" with "invalid" in tests
* numfmt: move INVALID to respect alph. order
* numfmt: move printlns outside of match to avoid duplication
Co-authored-by: Sylvestre Ledru <sledru@mozilla.com>
* numfmt: remove empty line
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
Co-authored-by: Sylvestre Ledru <sledru@mozilla.com>
2023-07-01 17:08:12 +02:00
Daniel Hofstetter
a145798594
Merge pull request #4960 from granquet/ls_LZ
...
ls: force fetching metadata when called with -L -Z
2023-07-01 15:24:37 +02:00
Daniel Hofstetter
c524ec4a9f
Merge pull request #4950 from Ideflop/more_implement_arguments_plain_and_from_line
...
More implement arguments plain and from line
2023-07-01 14:18:54 +02:00
crapStone
863f91eca9
fix typos
...
some arguments had the wrong case
2023-06-29 15:34:19 +00:00
Daniel Hofstetter
610e0461e9
Merge pull request #5020 from indygreg/hashsum-file-stem
...
hashsum: use file_stem() instead of file_name()
2023-06-29 13:50:30 +02:00
Daniel Hofstetter
5b18c53c9d
Merge pull request #4999 from sylvestre/mv-backup-src
...
mv: add the check with --b=simple and when the source is a backup
2023-06-29 13:19:40 +02:00
Gregory Szorc
a7f95d5a23
hashsum: use file_stem() instead of file_name()
...
This program matches the binary name to determine which
algorithm to use. On Windows, `file_name()` was matching
against a string with `.exe`, causing binaries like
`sha256sum.exe` to not properly detect the algorithm.
By using `file_stem()`, we exclude the `.exe` from matching,
achieving similar and correct behavior on Windows.
2023-06-29 10:50:10 +02:00
Daniel Hofstetter
3357aa87a1
Merge pull request #5018 from sylvestre/memmap2
...
Move memmap2 in the root workpace
2023-06-29 09:31:04 +02:00
Sylvestre Ledru
14e5f89a0e
Move memmap2 in the root workpace
2023-06-28 23:16:16 +02:00
Sylvestre Ledru
40c598852b
mv: add the check with --b=simple and when the source is a backup
2023-06-28 23:11:28 +02:00
Sylvestre Ledru
24aff229da
Add a function to detect if file is likely to be the simple backup file
2023-06-28 23:11:25 +02:00
John Shin
d2e7ba2da1
sort: add tests for stable and unstable sort
2023-06-27 12:15:58 -07:00
John Shin
0ff00ec44c
uucore: leading zeros are ignored in version compare
2023-06-26 16:28:31 -07:00
Ideflop
77f8201fb8
more: fix bug not displaying next file message and not stopping at end of file
2023-06-26 21:57:52 +02:00
Ideflop
479340306e
more: implement arguments -u/--plain and -F/--from-line
2023-06-26 21:57:45 +02:00
Daniel Hofstetter
c05dbfa3b4
seq: rename "--widths" to "--equal-width"
...
for compatibility with GNU seq
2023-06-26 16:21:59 +02:00
Terts Diepraam
873c6c36f7
Merge branch 'main' into ls_LZ
2023-06-26 15:52:52 +02:00
Daniel Hofstetter
9149409065
Merge pull request #4991 from shinhs0506/du_apparent
...
du: directories have apparent size of 0
2023-06-26 14:58:40 +02:00
Guillaume Ranquet
80c7ed9732
ls: force fetching metadata when called with -L -Z
...
The metadata are not used but it permits to check the symlink is valid.
We then return 1 on invalid symlinks when ls is invoked with ls -L -Z
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
2023-06-26 14:46:56 +02:00
Daniel Hofstetter
6a7b5379ea
Merge pull request #5008 from uutils/renovate/libc-0.x
...
fix(deps): update rust crate libc to 0.2.147
2023-06-26 07:56:10 +02:00
John Shin
b34e7f7bf6
du: directories have apparent size of 0
2023-06-25 15:56:57 -07:00
Sylvestre Ledru
644fd1c93e
fix some clippy warnings
2023-06-25 22:29:08 +02:00
Nikolai
0b06f2b4a8
fixing seq panic on none
2023-06-25 22:23:40 +02:00
Sylvestre Ledru
b03a88e154
Merge pull request #4972 from cakebaker/sort_migrate_from_ouroboros_to_self_cell
...
sort: migrate from ouroboros to self_cell
2023-06-25 21:15:02 +02:00
renovate[bot]
824097d224
fix(deps): update rust crate libc to 0.2.147
2023-06-25 19:09:01 +00:00
Sylvestre Ledru
ddcdda44db
Remove the auto capitalization of error message
2023-06-25 00:18:33 +02:00
Sylvestre Ledru
da8cb64b74
Merge pull request #4989 from cakebaker/touch_rename_const
...
touch: rename CURRENT to TIMESTAMP
2023-06-24 10:24:21 +02:00
Sylvestre Ledru
ed71bb60e0
Merge pull request #4995 from cakebaker/nl_implement_default_for_settings
...
nl: implement Default for Settings
2023-06-24 10:24:08 +02:00
Daniel Hofstetter
d57a5eb6a3
seq: remove two chars in seq.md
2023-06-24 07:07:38 +02:00
renovate[bot]
0144a3c78f
fix(deps): update rust crate itertools to 0.11.0
2023-06-22 13:43:21 +00:00
Daniel Hofstetter
0010fece35
nl: remove "spell-checker:ignore" line
2023-06-22 14:35:04 +02:00
Daniel Hofstetter
d00134640b
nl: use "const" instead of "static"
2023-06-22 14:33:32 +02:00
Daniel Hofstetter
c32139784a
nl: implement Default for Settings
2023-06-22 14:30:53 +02:00