1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2026-01-18 11:11:10 +00:00
Commit graph

7657 commits

Author SHA1 Message Date
David Rebbe
c4ffeea320 sort: options -C and -c should be mutually exclusive but aren't 2025-01-23 10:20:48 +01:00
David Rebbe
fb5172eb2a sort: needs support for human-readable block size suffixes R and Q 2025-01-22 23:35:57 -05:00
Tommaso Fellegara
93e3d08d5f
ls, date: refactor common code for formatting a datetime (#7194)
* refactoring ls and date

* Refactored and integrated ls and date and added tests to the new feature

* Style refactoring
2025-01-22 17:39:00 +01:00
Sylvestre Ledru
f731f2cba3
Merge pull request #7188 from ic3man5/main
sort: errors on overflowing -k argument but shouldn't
2025-01-22 10:05:51 +01:00
Daniel Hofstetter
af2a26b57f kill: list signal 0 with -l and -t 2025-01-22 08:20:47 +01:00
David Rebbe
2ebdc4984d sort: set -k arg to usize::MAX on overflow
newline, format, and more rust idiomatic code.

refactor to remove panic!
2025-01-21 22:36:43 -05:00
Daniel Hofstetter
6a5f2aa334
Merge pull request #7175 from sylvestre/thiserror2
Move some programs to thiserror
2025-01-20 16:17:25 +01:00
Dorian Peron
ed4edb4b8a cksum: Add crc32b algorithm 2025-01-20 12:08:36 +01:00
Daniel Hofstetter
20eb5466c0 mv: show prompt for -u --interactive 2025-01-20 10:47:47 +01:00
Sylvestre Ledru
418aaaffde chroot: move to thiserror 2025-01-20 00:04:53 +01:00
Sylvestre Ledru
6866eedc83 mv: move to thiserror 2025-01-19 23:57:53 +01:00
Sylvestre Ledru
9de6393e2c touch: move to thiserror 2025-01-19 23:57:53 +01:00
Sylvestre Ledru
70f3429102 seq: move to thiserror 2025-01-19 23:57:53 +01:00
Sylvestre Ledru
740cea7a46 sort: move to thiserror 2025-01-19 23:57:53 +01:00
Daniel Hofstetter
1597e26fd0
Merge pull request #7157 from sylvestre/missing-dep
Add missing dependencies
2025-01-19 14:28:02 +01:00
Joseph Jon Booker
1e0f697ab0 expr: Fix cargo fmt of src/uu/expr/src/syntax_tree.rs 2025-01-19 05:24:41 -06:00
Sylvestre Ledru
8c27c7f3f2 Update src/uu/expr/src/syntax_tree.rs 2025-01-19 05:15:13 -06:00
Joseph Jon Booker
6701c6ef44 expr: Rework branches and add tests for check_posix_regex_errors 2025-01-19 05:15:13 -06:00
Joseph Jon Booker
cfb539d672 expr: rename validate_regex to check_posix_regex_errors
Also clarified the intent of this function
2025-01-19 05:15:13 -06:00
Joseph Jon Booker
335b13f940 expr: Minor linting fix 2025-01-19 05:15:13 -06:00
Joseph Jon Booker
bff827d9ed expr: Reject invalid intervals in regular expressions 2025-01-19 05:15:13 -06:00
Joseph Jon Booker
fa0bd722b7 expr: Allow initial asterisk in regular expressions
GNU expr appears to treat this as a literal asterisk
2025-01-19 05:15:12 -06:00
Joseph Jon Booker
6a7df7d6c1 expr: Add specific errors for invalid regular expressions 2025-01-19 05:11:40 -06:00
Joseph Jon Booker
0ba9a301b0 expr: fix panic for "empty substitution" test case 2025-01-19 05:09:22 -06:00
Joseph Jon Booker
aa010b71b8 expr: Change error messages when missing closing parenthesis
This situation now has two errors - one if we parse a character that
isn't a closing parenthesis, and the other if we don't parse anything.
2025-01-19 05:09:22 -06:00
Sylvestre Ledru
03fc5ca381 chmod/uucore dep: add missing dependency 2025-01-18 21:45:55 +01:00
Sylvestre Ledru
178f57fad6 uucore: add missing declarations 2025-01-18 21:43:18 +01:00
Daniel Hofstetter
79f4b8976c
Merge pull request #7154 from jfinkels/ls-time-style-timezone-abbrev
ls: display %Z alphabetic time zone abbreviation
2025-01-18 16:54:16 +01:00
Jeffrey Finkelstein
ab6d95cdb9 ls: display %Z alphabetic time zone abbreviation
Display the alphabetic timezone abbreviation (like "UTC" or "CET") when
the `--time-style` argument includes a `%Z` directive. This matches the
behavior of `date`.

Fixes #7035
2025-01-18 09:33:52 -05:00
Jeffrey Finkelstein
ef0377d3da ls: refactor time formatting helper method 2025-01-18 09:29:01 -05:00
Daniel Hofstetter
64dad0c3ab
Merge pull request #7144 from sylvestre/comm2
comm: implement the ordering check
2025-01-18 14:53:33 +01:00
Sylvestre Ledru
b50a012d13 comm: implement the ordering check
A few comments:
* skip if the two args are pointing to the same file
* skip if the same content in the two files
* implement --check-order
* implement --nocheck-order
* output the right things on stderr

Should pass: tests/misc/comm
2025-01-18 09:22:41 +01:00
Yykz
96c17312ea df: fix display of special characters
Replace the display of certain special characters in `df`: ASCII space
for plain space character, ASCII horizontal tab for plain tab
character, and ASCII backslash for plain backslash character.

Co-authored-by: Jeffrey Finkelstein <jeffrey.finkelstein@protonmail.com>
2025-01-16 21:49:58 -05:00
Daniel Hofstetter
7edd045206 date: use UTC if TZ is empty 2025-01-16 11:44:45 +01:00
Daniel Hofstetter
ada18863a7 date: adapt to API change in chrono-tz 2025-01-16 11:44:45 +01:00
Alexander Shirokov
b3c0633b95
seq:add bounds for exponents
Add bounds for exponents to avoid overflow issues for inputs like 'seq
1e-9223372036854775808'
2025-01-15 22:35:24 +01:00
Daniel Hofstetter
1b5e321fc2 dircolors: move use declaration to top 2025-01-15 14:19:05 +01:00
Alexander
05ada0d204
seq:add floating point support (#6959)
* seq:enable parsing of hexadecimal floats

Turn on the float parser. Now it's possible to use hexadecimal floats as
parameters. For example,

    cargo run -- 0x1p-1 3
    0.5
    1.5
    2.5

Issue #6935

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2025-01-15 11:53:18 +01:00
Daniel Hofstetter
c322fb5c73
Merge pull request #7134 from jfinkels/date-timezone-name
date: display %Z alphabetic time zone abbreviation
2025-01-15 11:07:46 +01:00
Krishna Nagam
d82d038b54 date: display %Z alphabetic time zone abbreviation
Improve the display of dates formatted with the `%Z` specifier so that
the timezone abbreviation is displayed, not just its numeric offset.

Fixes #3756

Co-authored-by: Jeffrey Finkelstein <jeffrey.finkelstein@protonmail.com>
2025-01-14 17:49:11 -05:00
Jeffrey Finkelstein
dac35129d2 date: add dependencies for managing time zones
Add dependencies on third-party packages `chrono-tz` and
`iana-time-zone` to our `date` package. Together, these two packages
allow us to produce time zone abbreviations (like `UTC`) from numeric
timezone offsets.
2025-01-14 17:49:11 -05:00
Sylvestre Ledru
106873171d dircolors: ignore spell issues 2025-01-14 23:25:32 +01:00
Sylvestre Ledru
591cdc1d31 dircolors: split the code to remove the clippy warning 2025-01-14 23:25:32 +01:00
Sylvestre Ledru
1db2e2356a dircolors: fix empty COLORTERM matching with ?* pattern
should fix tests/misc/dircolors
2025-01-14 23:25:32 +01:00
Sylvestre Ledru
74d80eab0a
Merge pull request #7061 from DaringCuteSeal/cp-stream-2
cp: implement copying from streams
2025-01-13 14:13:13 +01:00
Sylvestre Ledru
40511f6da0
Merge pull request #7122 from jfinkels/dd-error-iflag-directory
dd: error if iflag=directory and input is stdin
2025-01-13 14:11:32 +01:00
Jeffrey Finkelstein
071e72ffc8 split: fix bug with large arguments to -C
Fix the behavior of `split -C` when given large arguments. Before this
commit, bytes were being greedily assigned to a chunk too aggressively,
leading to a situation where a split happened in the middle of a line
even though the entire line could have fit within the next chunk. This
was appearing for large arguments to `-C` and long lines that extended
beyond the size of the read buffer. This commit fixes the behavior.

Fixes #7026
2025-01-13 09:36:48 +01:00
Jeffrey Finkelstein
d9b3b3ef67 dd: error if iflag=directory and input is stdin
Make `dd` error if `iflag=directory` and the input file is not a
directory, as in

    : | dd iflag=directory

Fixes #5900
2025-01-13 09:36:36 +01:00
Sylvestre Ledru
35b896f5e1
Merge pull request #7093 from jfinkels/tsort-print-cycle
tsort: print nodes and cycles as they are visited
2025-01-13 08:52:38 +01:00
Sylvestre Ledru
da40b3564e
Merge pull request #7116 from jfinkels/df-error-on-overmounted
df: error on over-mounted device
2025-01-12 21:28:47 +01:00