Ben Wiederhake
cad94a69be
tr: prevent passing options in the wrong place
...
Note: This requires using the DEPRECATED item Command::trailing_var_arg
in clap. This is going to be another
[problem with clap](https://github.com/tertsdiepraam/uutils-args/blob/main/docs/design/problems_with_clap.md ).
2024-02-23 11:58:22 +01:00
Ben Wiederhake
d9b6675bbf
tr: enable passing -c multiple times
2024-02-23 11:58:18 +01:00
Daniel Hofstetter
5a2e0c700e
Merge pull request #5990 from BenWiederhake/dev-shuf-head-null
...
shuf: Do not read input when -n0 is given
2024-02-23 09:01:14 +01:00
Ben Wiederhake
617f3a8b6f
tr: when deleting and squeezing, never complement set2
2024-02-23 06:08:37 +01:00
Ben Wiederhake
48c4b57c97
tr: require second string argument when deleting and squeezing
2024-02-23 03:23:07 +01:00
Ben Wiederhake
a29f68b720
shuf: Do not read input when -n0 is given
...
This is explicitly tested by some suites, including the GNU test suite.
2024-02-22 23:50:03 +01:00
Ben Wiederhake
a59924ece5
shuf: treat -e as a flag, not as a multi-value arg
2024-02-22 23:22:35 +01:00
Sylvestre Ledru
f7821cd0d2
Merge pull request #5995 from cakebaker/factor_enable_debug_assert
...
factor: enable a debug_assert! statement
2024-02-22 16:51:54 +01:00
Daniel Hofstetter
999303e0d4
shuf: add missing word to BENCHMARKING.md
2024-02-22 15:13:54 +01:00
Daniel Hofstetter
4da633b835
factor: enable a debug_assert! statement
2024-02-22 09:33:29 +01:00
Daniel Hofstetter
725da985c1
Fix "item x imported redundantly" warnings
2024-02-19 15:39:37 +01:00
Terts Diepraam
177ac7ea28
stat
: use chrono instead of time in fsext (#5934 )
...
* stat: use chrono instead of time in fsext
This removes the dependency of `fsext` on `time` and it cleans up the code.
* stat: use chrono instead of time in fsext
This removes the dependency of `fsext` on `time` and it cleans up the code.
* stat: fix two errors from clippy & spell-checker
* stat: move fn to fix clippy error
* stat: print - if birth time unknown
* uucore/fsext: fix "unused import" error on Windows
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-02-19 10:21:26 +01:00
Sylvestre Ledru
9866f022a8
Merge pull request #5987 from tertsdiepraam/expand-remove-collect-ignore
...
`expand`: do not ignore invalid UTF-8
2024-02-18 15:19:47 +01:00
Terts Diepraam
913656be9d
expand: do not ignore invalid UTF-8
2024-02-18 14:26:23 +01:00
Terts Diepraam
4da6d58a6b
numfmt: remove clap workaround
2024-02-18 13:32:00 +01:00
Ben Wiederhake
b091911aae
shuf: refuse multiple input ranges and multiple output files
2024-02-16 21:14:56 +01:00
Ben Wiederhake
69f23c2521
shuf: obey all headcount args, not just the last
2024-02-16 21:08:16 +01:00
Ben Wiederhake
07e8f4c7a5
shuf: include all echo args, not just the last
2024-02-16 20:49:59 +01:00
Daniel Hofstetter
420dfe8a9b
Merge pull request #5958 from tertsdiepraam/csplit-printf
...
`csplit`: use `printf` functionality from `uucore`
2024-02-16 14:39:03 +01:00
Terts Diepraam
fc82360f58
csplit: fix up tests and error message for filenames
2024-02-16 11:51:04 +01:00
Daniel Hofstetter
bfe6f0f004
Merge pull request #5979 from BenWiederhake/dev-shuf-null-input
...
shuf: Treat empty file as zero elements instead of one emptystring
2024-02-16 09:19:44 +01:00
David Matos
de74f707e9
uname: Refactor into public fns for Nushell ( #5921 )
...
* Refactor to use options struct and make it public for Nushell
* Return the output for use in nushell
* wip:opt1
* Add UNameOutput struct instead
* Apply req changes
* change back to mod options
* uname: add empty line & fix position of comment
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-02-16 08:53:36 +01:00
Ben Wiederhake
e54c9bebe2
shuf: Treat empty file as zero elements instead of one emptystring
2024-02-16 00:06:24 +01:00
Daniel Hofstetter
35141deeee
ln: fix help text
2024-02-15 14:38:26 +01:00
Daniel Hofstetter
6adaf31d49
Merge pull request #5962 from wolimst/cut/fix/multiple-mode-args
...
cut: show error for multiple mode args (`-b`, `-c`, `-f`)
2024-02-14 14:23:47 +01:00
wolimst
6bec96aad1
cut: refactor mode args counting by removing nested map
2024-02-14 20:02:42 +09:00
BaherSalama
5603305e75
fix tr with any flag with more than 2 operands ( #5952 )
...
* fix tr
* add tests
* fix clippy
* fix clippy2
* do suggestions
* do suggestions
* remove mut
* tr: move var to block & remove its type
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-02-13 15:30:15 +01:00
Daniel Hofstetter
826cdbe3dc
Merge pull request #5940 from cre4ture/fix/stabilize_android_build_memory_kill_split
...
`split` fix android memory kill in split
2024-02-12 16:50:19 +01:00
Sylvestre Ledru
b4c8a1aee0
Merge pull request #5970 from cakebaker/ls_date_rename_duration_to_time_delta
...
ls,date: rename `chrono::Duration` to `chrono::TimeDelta`
2024-02-11 14:18:13 +01:00
Daniel Hofstetter
120a0e09fc
ls,date: rename chrono::Duration to TimeDelta
2024-02-11 13:24:20 +01:00
Terts Diepraam
e0c2714d60
tsort: drastically reduce memory copies
2024-02-11 10:57:19 +01:00
Ulrich Hornung
e68312cae9
sane blksize to avoid memory kill in split -n 3 /dev/zero
2024-02-10 14:33:13 +01:00
Terts Diepraam
0602c197ff
csplit: use uucore/format functionality for suffix
2024-02-10 11:51:20 +01:00
wolimst
0ac8606577
cut: add comments about handling multiple cutting mode args
2024-02-09 22:15:18 +09:00
wolimst
cb0ce0e1cb
cut: show error for multiple mode args (-b, -c, -f)
2024-02-09 15:56:15 +09:00
Daniel Hofstetter
04ebd863a6
clippy: fix warnings introduced by Rust 1.76
2024-02-08 16:56:01 +01:00
BaherSalama
5c2ae5be4f
fix tr with delete flag if more than 1 operand given ( #5945 )
...
* fix tr
* fix
* adding a test
* tr: rename test function
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-02-06 16:42:08 +01:00
Terts Diepraam
64cb591e3b
seq: fix about text not found
2024-02-06 13:45:12 +01:00
Daniel Hofstetter
d2a75457f6
Fix errors reported by new version of cspell
2024-02-05 09:12:52 +01:00
Ludmuterol
96d96e7de3
more handle errors with multiple files ( #4997 )
...
* more handle errors with multiple files
* tests/more test refactor and new case
* tests/more new cases
* more: use show! and change exitstatus and adjust tests to new exitvalue
---------
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2024-02-04 16:32:14 +01:00
Biplab Mochan Gartia
fd4e1cfb28
stat: should fail without arguments #5928 ( #5935 )
...
* stat: should fail without arguments #5928
* style and lint issue stat: should fail without arguments #5928
* style and lint issue stat: should fail without arguments #5928
* style and lint 2 issue stat: should fail without arguments #5928
---------
Co-authored-by: biplab5464 <biplab5464@outlook.com>
2024-02-02 17:00:35 +01:00
Samuel Larkin
c7f730470f
doc: fixed benchmark table
2024-02-02 10:13:38 -05:00
Daniel Hofstetter
47843dc8f5
ls: fix "unused variable" warning on Redox
2024-02-02 09:13:38 +01:00
Biplab Mochan Gartia
4a7dfa7904
stat.rs: Refactor to remove #[allow(clippy::cognitive_complexity)] #5881 ( #5924 )
...
* stat.rs: Refactor to remove #[allow(clippy::cognitive_complexity)] #5881
* remvoe Vec when ruturing stat.rs: Refactor to remove #[allow(clippy::cognitive_complexity)] #5881
* formmating issue stat.rs: Refactor to remove #[allow(clippy::cognitive_complexity)] #5881
* cakebaker suggestion stat.rs: Refactor to remove #[allow(clippy::cognitive_complexity)] #5881
* sytle and lint issue stat.rs: Refactor to remove #[allow(clippy::cognitive_complexity)] #5881
---------
Co-authored-by: biplab5464 <biplab5464@outlook.com>
2024-02-01 16:20:32 +01:00
Daniel Hofstetter
d53077160f
Merge pull request #5914 from Ideflop/disable-row-mode-on-panic
...
more: Disable raw mode before exiting if a panic occurs
2024-02-01 15:08:08 +01:00
Ideflop
b9112da4b2
more: Disable raw mode before exiting if a panic occurs
2024-01-30 20:57:38 +01:00
Sylvestre Ledru
8691ec9a80
Merge pull request #5916 from cakebaker/du_non_existing
...
du: adapt error message to match GNU's
2024-01-30 17:13:37 +01:00
Sudhakar Verma
bd336ebbf1
dd: fail on missing number in count
2024-01-30 20:21:25 +05:30
Daniel Hofstetter
d1e1e9ce0f
du: adapt error msg to match GNU's
2024-01-30 10:08:50 +01:00
Terts Diepraam
1b324da436
echo: do not infer long args
2024-01-29 17:40:22 +01:00