Commit graph

675 commits

Author SHA1 Message Date
Sylvestre Ledru
55fd1f3617 Replace list of digit by is_ascii_digit
and some ride along simplification
2023-09-28 23:07:01 +02:00
Sylvestre Ledru
265c258713 ranges: add unit tests to verify the parsing
To test them:
$ cargo test -p uucore --features ranges
2023-09-26 09:40:21 +02:00
Sylvestre Ledru
99120d32c1 cut: fail when the input == usize::MAX 2023-09-26 09:40:21 +02:00
renovate[bot]
6aba3a4d67
fix(deps): update rust crate wild to 2.2 2023-09-24 20:04:53 +00:00
pin
23ee9b622d
Add NetBSD support to uucore. (#5289)
* Add NetBSD support to uucore.

Fixes https://github.com/uutils/coreutils/issues/5288
2023-09-21 12:24:08 +02:00
Sylvestre Ledru
9b4d2c6bc4
ls: implement --dired
* Support ls --dired

* stat-failed.sh: update of the test - we have a small difference

* ls --dired: address some of the comments

* fix warnings

* use unwrap()

* Improve test

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* Simplify test

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* Remove a word from the spell ignore

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* remove duplication of the spell ignore

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* rustfmt

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-09-20 08:17:46 +02:00
renovate[bot]
416a4832b8
fix(deps): update rust crate dns-lookup to 2.0.3 2023-09-17 17:46:16 +00:00
Daniel Hofstetter
d19b8b78d8 uucore: turn quoting_style into a feature 2023-09-10 15:07:37 +02:00
Sylvestre Ledru
80f8eb6724
Merge pull request #5252 from zhitkoff/split-gnu-test-fail.sh
split: implement remaining -n variants and pass GNU tests/split/fail.sh
2023-09-07 17:15:09 +02:00
Daniel Hofstetter
5c93c592db uucore: turn version_cmp into a feature 2023-09-06 09:47:50 +02:00
zhitkoff
2ae1d8d1cc split: missing functionality for --number option 2023-09-05 17:13:30 -04:00
zhitkoff
636c2bb7ae uucore: parse_size_max and split 2023-09-04 12:05:26 -04:00
Daniel Hofstetter
183d465f74 uucore: turn ranges into a feature 2023-09-03 16:20:15 +02:00
Sylvestre Ledru
9844f1f07d 0.0.20 => 0.0.21 2023-09-03 14:42:54 +02:00
Daniel Hofstetter
b405d4e6cc uucore: turn update_control into a feature 2023-09-02 14:45:58 +02:00
Sylvestre Ledru
6012002880
Merge pull request #5231 from cakebaker/uucore_backup_control_feature
uucore: turn backup_control into a feature
2023-09-01 21:08:59 +02:00
Sylvestre Ledru
b783088900
Merge pull request #5229 from cakebaker/uucore_make_dunce_optional
uucore: make "dunce" optional
2023-09-01 16:54:42 +02:00
Daniel Hofstetter
b41ff2ed7f uucore: turn backup_control into a feature 2023-09-01 16:20:37 +02:00
Daniel Hofstetter
2e71508308 uucore: make "dunce" optional 2023-09-01 09:47:22 +02:00
XXIV
4f465eb76c
remove unnecessary heap allocation 2023-08-31 23:44:45 +03:00
Daniel Hofstetter
fb1c663724 uucore: make deps of "sum" feature optional 2023-08-31 16:45:55 +02:00
Daniel Hofstetter
2e2387d434 parse_size,dd: turn instance fns to associated fns 2023-08-26 14:35:35 +02:00
Sylvestre Ledru
f0602b0ce6
Merge pull request #5204 from cakebaker/fix_clippy_warnings
Fix clippy warnings with Rust 1.72.0
2023-08-25 13:21:38 -04:00
Sylvestre Ledru
e8ed65f4fa
Merge pull request #5206 from cakebaker/fix_bool_to_int_with_if
uucore,comm: fix warnings from bool_to_int_with_if
2023-08-25 13:20:00 -04:00
Daniel Hofstetter
79a44d768c uucore,comm: fix warnings from bool_to_int_with_if 2023-08-25 15:29:15 +02:00
Daniel Hofstetter
b9c05ed4e3 Remove the author copyright notices
from files missed by https://github.com/uutils/coreutils/pull/5184
and https://github.com/uutils/coreutils/pull/5197
2023-08-25 15:03:19 +02:00
Daniel Hofstetter
01b2834f2e Fix clippy warnings with Rust 1.72.0 2023-08-25 13:22:02 +02:00
Terts Diepraam
c3f9e19a3b all: normalize license notice in all *.rs files 2023-08-24 12:21:09 +02:00
Sylvestre Ledru
0b9c829bce
Merge pull request #5182 from sylvestre/clippy_
Fix some of the recent clippy warnings
2023-08-21 16:21:02 -04:00
Sylvestre Ledru
bf5b765cba
Remove the author copyright notices (#5184)
* Remove the author copyright notices

Rational:
* not maintained
* does not reflect reality
* don't provide any value (the info can be found in the git log)
* we don't have rules to update them
  (ex: should you update it after one line, two lines, etc)

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-08-21 12:23:18 +02:00
Daniel Hofstetter
808f9e2fd6 uucore: add missing "!" 2023-08-21 10:56:17 +02:00
Sylvestre Ledru
bfca6bf70f Add license headers on all files 2023-08-21 10:49:27 +02:00
Sylvestre Ledru
7c9f4ba92a Fix some clippy warnings 2023-08-21 08:41:40 +02:00
Simon Legner
872818607f
Extract uucore::line_ending::LineEnding (#5120)
* Extract uucore::line_ending::LineEnding

Aims to provide consistent newline/zero terminator handling.

* Apply suggestions from code review

Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>

* cargo fmt

* Use uucore::line_ending::LineEnding

* Remove uucore::line_ending::LineEnding::Space

* Rename LineEnding::from_zero_flag

* Replace LineEnding::None with Option<LineEnding>

* cargo clippy

* assert_eq

* cargo clippy

* cargo clippy

* uucore/line_ending: add more documentation

---------

Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
2023-08-20 10:03:29 +02:00
Terts Diepraam
0a4f833bb7
Merge pull request #5127 from cakebaker/uucore_fix_shortcut_value_parser
uucore: don't show error for ambiguous value
2023-08-11 11:16:30 +02:00
Aneesh
773e69078c docs(bin,has): add docstrings for macros bin and has 2023-08-03 13:39:38 +05:30
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
fe9ec37141 uucore: use "workspace=true" for some dependencies 2023-07-22 16:14:32 +02:00
Sylvestre Ledru
74530c0f51 Update the version to 0.0.20 2023-07-14 13:04:17 +02:00
Daniel Hofstetter
5d03d2d9d4 clippy: fix warnings introduced by Rust 1.71.0 2023-07-13 17:35:33 +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
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
24aff229da Add a function to detect if file is likely to be the simple backup file 2023-06-28 23:11:25 +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
renovate[bot]
0144a3c78f
fix(deps): update rust crate itertools to 0.11.0 2023-06-22 13:43:21 +00:00
Daniel Hofstetter
24b979c821 uucore: introduce ShortcutValueParser 2023-06-14 13:34:50 +02:00
Rayhan Faizel
c113284a4b uucore: modify are_hardlinks_to_same_file to check only immediate metadata 2023-06-12 23:46:33 +05:30
Rayhan Faizel
ab42b1e599 uucore: add function which checks hardlink as well as directed symlink 2023-06-10 18:31:30 +05:30