Commit graph

6194 commits

Author SHA1 Message Date
Terts Diepraam
93a54f36f3 hashsum: change debug to display format with --tag 2023-08-29 10:15:38 +02:00
Yury Zhytkou
1eae064e5c
split: better handle numeric and hex suffixes, short and long, with and without values (#5198)
* split: better handle numeric and hex suffixes, short and long, with and without values
Fixes #5171

* refactoring with overrides_with_all() in args definitions

* fixed comments

* updated help on suffixes to match GNU

* comments

* refactor to remove value_parser()

* split: refactor suffix processing + updated tests

* split: minor formatting
2023-08-28 10:09:52 +02:00
Daniel Hofstetter
e4ea64af5c
Merge pull request #5211 from tertsdiepraam/nushell-expose-uucore-args
`cp`: re-export `uucore::{BackupMode, UpdateMode}`
2023-08-28 07:29:49 +02:00
Terts Diepraam
ab859f4efa cp: re-export uucore::{BackupMode, UpdateMode}
This allows other projects to construct values for these types
which in turn allows them to construct Options.

This is implemented at the request of nushell
2023-08-28 00:19:10 +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
Sylvestre Ledru
055537e831
Merge pull request #5187 from Benjscho/jwalk-investigation
Add benchmarking for `rm`
2023-08-25 13:19:14 -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
Ben Schofield
4d78ca47b1 Add Spell ignore
Add `samply` and `flamegraph` to spell ignore lists.
2023-08-24 11:15:03 -06:00
Terts Diepraam
c3f9e19a3b all: normalize license notice in all *.rs files 2023-08-24 12:21:09 +02:00
Ben Schofield
903490a9c8 spelling 2023-08-23 13:05:06 -07:00
Daniel Hofstetter
774180bb09 Remove the author copyright notices
from files missed by #5184
2023-08-23 10:54:00 +02:00
Ben Schofield
9ddf218ed9 Add samply url 2023-08-22 07:59:11 -07:00
Ben Schofield
181261beef Add samply to sampling options
Add samply to the sampling options for `rm` benchmarking.
2023-08-22 07:56:42 -07: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
Ben Schofield
76eea583b4 Add benchmarking for rm
Add benchmarking script and guide for `rm`, mostly copied from `ls` benchmarking
guide. Tested `rm` using `jwalk` instead of `walkdir`, and saw a slight performance
regression, if any change.
2023-08-21 12:10:31 -07: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
675db9186e id: remove mutable reference when calling id_print 2023-08-21 11:39:18 +02:00
Daniel Hofstetter
ba8e9366f6 stdbuf: fix get_preload_env doesn't need a mutable reference 2023-08-21 10:56:17 +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
tommady
b5746f794c
date: fix panic when input will cause overflow (#5160)
* fix issue 5149

* fix clippy style issue

* fix spell issue

* address comment

* address comments

* fix cspell
2023-08-20 16:55:38 +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
Sylvestre Ledru
3b0bfb10ac
Merge pull request #5172 from tertsdiepraam/docs-platform-support-page
Docs platform support page
2023-08-19 19:21:48 +02:00
Terts Diepraam
171f9d660c docs: add platform support page in the docs 2023-08-19 18:19:12 +02:00
Daniel Hofstetter
d604f709ce nl: handle line number overflow 2023-08-19 07:16:06 +02:00
Terts Diepraam
9e3d93e7ea
Merge pull request #5152 from tertsdiepraam/cp-prepare-for-nu
`cp`: make more types public and add more documentation (for nushell)
2023-08-19 00:39:23 +02:00
Terts Diepraam
f1978955ba
Merge pull request #5156 from cakebaker/nl_implement_try_from_for_numbering_style
nl: implement TryFrom<&str> for NumberingStyle
2023-08-18 23:10:32 +02:00
Terts Diepraam
597f51670c cp: refactor attribute parsing
Clean up the parsing of the attributes to
preserve. There are several improvements here: Preserve now uses  `max`
from Ord, the `max` method is now called `union` and does not mutate,
the parse loop is extracted into a new function `parse_iter`, the `all`
and `none` methods are replaced with const values. Finally
all fields of Attributes are now public.
2023-08-16 19:04:18 +02:00
Bluelief
946e1bb2d1
fmt: fix panic on width argument 2023-08-14 22:47:21 +09:00
Daniel Hofstetter
d5ab7bbacd nl: implement TryFrom<&str> for NumberingStyle 2023-08-13 14:09:15 +02:00
Daniel Hofstetter
08e21e183b nl: re-add handling for -p/--no-renumber 2023-08-12 14:36:22 +02:00
Terts Diepraam
ffa08f4741 cp: make more types public and add more documentation 2023-08-11 19:56:40 +02:00
Terts Diepraam
a3b80e1bef
Merge branch 'main' into fmt_implement_default_for_fmtoptions 2023-08-11 12:38:42 +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
Terts Diepraam
8f5899b8d9
Merge pull request #5147 from cakebaker/rm_refactor_prompt_file
rm: refactor prompt_file()
2023-08-11 10:14:37 +02:00
Terts Diepraam
31eebea804
Merge pull request #5131 from cakebaker/nl_refactoring
nl: fix output of numbering styles
2023-08-10 23:52:30 +02:00
Terts Diepraam
268292f9f8
Merge pull request #5143 from cakebaker/mv_remove_unnecessary_or
mv: remove unnecessary OR in condition
2023-08-10 23:33:40 +02:00
Daniel Hofstetter
113972aa44 rm: replace "if" with "match" in prompt_file() 2023-08-10 15:58:08 +02:00
Daniel Hofstetter
bdd25c37cf rm: split prompt_file() into two functions 2023-08-10 15:58:01 +02:00
Rayhan Faizel
e3ea6144cb stat: Output error when - and -f are used together. 2023-08-10 08:33:53 +05:30
Daniel Hofstetter
09360e6796 mv: remove unnecessary OR in condition 2023-08-09 16:15:30 +02:00
Daniel Hofstetter
6b1c4d1fa9 seq: remove unused param from write_value_float() 2023-08-07 15:22:06 +02:00
John Shin
0aa29682d0 seq: display -0 2023-08-07 00:09:46 -07:00
Daniel Hofstetter
271606ddfa nl: fix output of numbering styles 2023-08-03 16:53:56 +02:00
Aneesh
773e69078c docs(bin,has): add docstrings for macros bin and has 2023-08-03 13:39:38 +05:30