Commit graph

11669 commits

Author SHA1 Message Date
Daniel Hofstetter
6eec4fe8f9 cut: add test & improve error message 2023-11-29 09:41:11 +01:00
Daniel Hofstetter
08998c0e40
Merge pull request #5593 from cakebaker/fmt_rename_var
fmt: rename `pfxind_end` -> `prefix_indent_end`
2023-11-29 08:08:55 +01:00
Sylvestre Ledru
86af36098f
Merge pull request #5594 from daissi/wip/daissi/fix-license-uuhelp-parser
uuhelp_parser: include missing LICENSE
2023-11-28 17:19:06 +01:00
Dylan Aïssi
7383820354 uuhelp_parser: include missing LICENSE
Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>
2023-11-28 16:51:20 +01:00
Daniel Hofstetter
2d5ea26410 fmt: rename pfxind_end -> prefix_indent_end 2023-11-28 14:42:28 +01:00
Daniel Hofstetter
32bc2e4bc8
Merge pull request #5592 from tertsdiepraam/fmt-small-refactor
`fmt`: a collection of small refactors
2023-11-28 14:15:30 +01:00
Terts Diepraam
2a8f4ec294 fmt: inline parse_arguments function 2023-11-28 12:42:23 +01:00
Terts Diepraam
0b4d4b610c fmt: put options into module and change static to const 2023-11-28 12:42:23 +01:00
Terts Diepraam
8a49453057 fmt: clean up imports 2023-11-28 12:42:23 +01:00
Terts Diepraam
96ca5e609e fmt: refactor width and goal calculation 2023-11-28 12:42:23 +01:00
Terts Diepraam
f5206ce783 fmt: merge prefix and use_prefix options (same for anti_prefix) 2023-11-28 12:42:20 +01:00
Terts Diepraam
d78923e4cc fmt: extract determining options to separate function 2023-11-28 12:37:09 +01:00
Terts Diepraam
01c32a5220 fmt: clean up some small bits 2023-11-28 11:40:33 +01:00
Sylvestre Ledru
b5ce876fef
Merge pull request #5580 from zhitkoff/split-r-chunk
split: passing GNU test r-chunk.sh
2023-11-28 10:38:00 +01:00
Sylvestre Ledru
14a8e8a452
Merge pull request #5128 from tertsdiepraam/printf-rewrite
`printf` rewrite (with a lot of `seq` changes)
2023-11-28 07:52:58 +01:00
Sylvestre Ledru
0e8197e2f0
Merge pull request #5586 from tertsdiepraam/expr-ast-refactor
`expr`: refactor AST and parsing
2023-11-28 07:51:11 +01:00
Terts Diepraam
83784b2d96 expr: refactor AST and parsing 2023-11-27 15:18:14 +01:00
Terts Diepraam
8eb66ab7ea printf: remove whitespace, remove redundant spelling ignore and revert matching on result 2023-11-27 11:53:26 +01:00
Sylvestre Ledru
88d63be3a0
Merge pull request #4545 from jfinkels/dd-reblock
dd: buffer partial blocks in the output writer
2023-11-27 09:31:36 +01:00
Daniel Hofstetter
55d931e853
Merge pull request #5582 from zhitkoff/wc-files
wc: pass GNU test wc-files0-from.pl
2023-11-27 06:57:43 +01:00
Jeffrey Finkelstein
ceccd2ecc6 dd: buffer partial blocks in the output writer
Add buffering of partial blocks in the output block writer until they
are completed.
2023-11-26 18:03:06 -05:00
Jeffrey Finkelstein
f343b7e964 dd: use read statistics for termination condition
Correct the behavior of `dd` so that the termination condition of the
main loop uses the number of bytes read, not the number of bytes
written, when the `count` command-line option is given in bytes
instead of blocks.
2023-11-26 18:03:06 -05:00
Jeffrey Finkelstein
b383e60998 dd: implement Add for WriteStat 2023-11-26 18:03:06 -05:00
Jeffrey Finkelstein
5142f35f83 dd: add BufferedOutput to buffer partial blocks 2023-11-26 18:03:06 -05:00
Jeffrey Finkelstein
016ae34d50 dd: add Settings.buffered field
Add the `Settings.buffered` field to indicate whether partial output
blocks should be buffered until they are complete.
2023-11-26 18:03:06 -05:00
zhitkoff
16f6a13697 wc: change where to unwrap 2023-11-26 15:14:48 -05:00
Terts Diepraam
cd4f455a77
Merge pull request #5581 from GDYendell/hashsum-remove-crash
hashsum: Remove usage of crash! macro
2023-11-26 12:25:50 +01:00
Gary Yendell
b6553edfb7 hashsum: Remove usage of crash! macro 2023-11-26 10:38:01 +00:00
Daniel Hofstetter
8f22e01d63
Merge pull request #5583 from uutils/renovate/davidanson-markdownlint-cli2-action-14.x
chore(deps): update davidanson/markdownlint-cli2-action action to v14
2023-11-26 10:40:40 +01:00
renovate[bot]
04e568db73
chore(deps): update davidanson/markdownlint-cli2-action action to v14 2023-11-26 00:47:15 +00:00
zhitkoff
f8f6346126 wc: fix FilesDisabled error message 2023-11-25 18:16:34 -05:00
zhitkoff
7b2a3e236e split: r-chunk tests and infinite input 2023-11-25 11:12:08 -05:00
zhitkoff
440e7b1a59 split: r-chunk test compliance 2023-11-25 11:12:08 -05:00
zhitkoff
dc92a434ef split: handling system limit on open files 2023-11-25 11:12:08 -05:00
Clint Teece
84b5e6f0a1
du: start printing output immediately (#5552)
* du: very rough draft of continuously printing output

* du: clean up printing logic, still needs some polishing

* du: gracefully handle case where `du` returns no `Stat`s

* du: print output using separate thread

* du: clean up print thread implementation

* du: send ownership of `Stat`s to printing thread as soon as `du` is done with them

* du: add basic error handling for communication between threads, use `StatPrinter` to handle printing thread logic

* du: move printing grand total into `StatPrinter`, and move initialization of printing-related variables into `StatPrinter::new`

* du: clean up calculation of `convert_size` function, and separate printing a single stat our into its own method in `StatPrinter`

* du: have printing thread handle printing IO-related errors, to ensure error messages and regular output message are written one at a time

* du: add comment explaining print thread, remove outdated comments and clippy allows

* du: restore clippy allows for cognitive complexity

---------

Co-authored-by: clint <cteece3@gatech.edu>
2023-11-25 15:13:12 +01:00
Sylvestre Ledru
64d47730bc
Merge pull request #5555 from cakebaker/cp_adapt_omitting_dir_msg
cp: improve error msg if -r is not specified
2023-11-24 21:51:04 +01:00
Sylvestre Ledru
46811f11c3
Merge pull request #5567 from zhitkoff/split-l-chunk
split: pass GNU test l-chunk
2023-11-24 21:48:01 +01:00
zhitkoff
4dc46f10e9 split: pass GNU test l-chunk 2023-11-24 10:06:16 +01:00
Daniel Hofstetter
97d30bd486
Merge pull request #5577 from cobaweel/issue-5576
Fix issue 5576 (regex matching bug in expr)
2023-11-23 17:57:45 +01:00
zoze0
550f3b0c48
uucore: add support for loongarch64 (#5574)
* uucore: add support for loongarch64

* add loongarch

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2023-11-23 17:41:11 +01:00
Coba Weel
7efe33108a Fix issue 5576 (regex matching bug in expr)
Issue 5576 reported a bug in expr, found by the fuzzer. The problem
turns out to be with the regex match operator `:`, which is defined in
POSIX and the GNU manual to match the pattern only when it occurs at
the beginning of the string, i.e., the regex has an implicit `^`
prepended to it. We hadn't been doing that.
2023-11-23 16:26:37 +01:00
Sylvestre Ledru
fff1302bdf
Merge pull request #5578 from cakebaker/expr_fix
expr: adapt error messages, revert most of #5559
2023-11-23 15:47:23 +01:00
Daniel Hofstetter
c2bfb6a465 expr: adapt error messages, revert most of #5559 2023-11-23 15:14:25 +01:00
Daniel Hofstetter
2e77d99dd4 expr: fail fast if there are no operands 2023-11-23 14:35:02 +01:00
Sylvestre Ledru
af021e0d4f
Merge pull request #5559 from pawelngei/expr-substr-error
expr: different stderr with `expr "56" "substr"`
2023-11-22 14:56:42 +01:00
Terts Diepraam
e95add7940 uucore/format: fix license headers and improve docs 2023-11-22 14:06:03 +01:00
Daniel Hofstetter
2fdc782699
Merge pull request #5568 from uutils/renovate/data-encoding-macro-0.x
fix(deps): update rust crate data-encoding-macro to 0.1.14
2023-11-22 08:47:20 +01:00
renovate[bot]
3425ee8d59
fix(deps): update rust crate data-encoding-macro to 0.1.14 2023-11-22 06:09:44 +00:00
Daniel Hofstetter
325d22defc
Merge pull request #5569 from uutils/renovate/data-encoding-2.x
fix(deps): update rust crate data-encoding to 2.5
2023-11-22 07:09:01 +01:00
renovate[bot]
18b5c22567
fix(deps): update rust crate data-encoding to 2.5 2023-11-21 22:24:11 +00:00