Ben Wiederhake
b233569b9c
shuf: fix error message text on negative-sized ranges
...
Found by @cakebaker:
https://github.com/uutils/coreutils/pull/6011#discussion_r1501838317
2024-03-09 22:51:13 +01:00
Ben Wiederhake
4ee3f68e6a
shuf: fix and test off-by-one errors around ranges
2024-03-09 22:51:13 +01:00
Ben Wiederhake
6834b593ee
shuf: refuse repeating zero lines
...
This was a GNU behavior bug:
```console
$ LC_ALL=C shuf -er
shuf: no lines to repeat
[$? = 1]
$ cargo run shuf -er # old, bad (unexpected success)
$ cargo run shuf -er # new
shuf: no lines to repeat
[$? = 1]
```
2024-02-25 16:49:03 +01:00
Ben Wiederhake
f25b2102db
shuf: document new benchmark category
2024-02-24 21:36:13 +01:00
Ben Wiederhake
352a8a5bd7
shuf: handle --input-range with huge number ranges
...
This requires special handling, because we cannot always generate all
possible strings beforehand, e.g. in the case of "-n 2 -i 0-2147483647".
2024-02-24 18:33:46 +01:00
Ben Wiederhake
989178f438
shuf: extract minimal required interface between data and core loop
2024-02-24 18:33:46 +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
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
Daniel Hofstetter
999303e0d4
shuf: add missing word to BENCHMARKING.md
2024-02-22 15:13:54 +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
Ben Wiederhake
e54c9bebe2
shuf: Treat empty file as zero elements instead of one emptystring
2024-02-16 00:06:24 +01:00
Sylvestre Ledru
dd5c6c2d00
0.0.23 => 0.0.24
2024-01-20 20:12:19 +01:00
Darius
edbb7d5b02
join: fixed parameter
...
basenc: fixed parameter
cut: fixed parameter
mkdir: fixed parameter
nohup: fixed parameter
pr: fixed parameter
printenv: fixed parameter
printf: added parameters
runcon: fixed typo
shuf: fixed typo
sum: fixed typo
uniq: fixed parameter
unlink: fixed parameter
2023-12-26 16:13:18 +01:00
Terts Diepraam
c32e730a1f
all: remove collect_{lossy,ignore} calls where possible
2023-12-15 14:38:27 +01:00
Sylvestre Ledru
ff92bfb25b
Prepare version 0.0.23
2023-11-13 22:02:01 +01:00
Kostiantyn Hryshchuk
6ac1af6953
Fix clippy::implicit_clone
2023-11-04 21:04:29 +01:00
Sylvestre Ledru
e1bd47d549
0.0.21 => 0.0.22
2023-10-15 14:33:23 +02:00
Sylvestre Ledru
9844f1f07d
0.0.20 => 0.0.21
2023-09-03 14:42:54 +02:00
Terts Diepraam
c3f9e19a3b
all: normalize license notice in all *.rs files
2023-08-24 12:21:09 +02:00
Daniel Hofstetter
774180bb09
Remove the author copyright notices
...
from files missed by #5184
2023-08-23 10:54:00 +02:00
Sylvestre Ledru
bfca6bf70f
Add license headers on all files
2023-08-21 10:49:27 +02:00
Sylvestre Ledru
74530c0f51
Update the version to 0.0.20
2023-07-14 13:04:17 +02:00
Sylvestre Ledru
6ecef3a0e3
Reformat TOML files with taplo
...
npx --yes @taplo/cli fmt
2023-06-08 09:07:19 +02:00
Sylvestre Ledru
830b7d5ce1
New release
2023-06-04 09:46:59 +02:00
Sylvestre Ledru
af0a263191
0.0.17 => 0.0.18
2023-03-29 08:11:25 +02:00
Sylvestre Ledru
422a27d375
parent 9d5dc500e6
...
author Sylvestre Ledru <sylvestre@debian.org> 1677865358 +0100
committer Sylvestre Ledru <sylvestre@debian.org> 1677951797 +0100
md: Fix a bunch of warnings in the docs
2023-03-04 18:43:40 +01:00
Chen Chi
e54c0063b0
shuf: move help strings to markdown file
2023-02-22 21:01:38 -08:00
Terts Diepraam
ae27c82020
Use workspace inheritance for dependencies
2023-02-11 18:54:46 +01:00
Daniel Hofstetter
f6b646e4e5
clippy: fix warnings introduced with Rust 1.67.0
2023-01-27 17:37:56 +01:00
Terts Diepraam
4d3dc78686
Version 0.0.17
2023-01-21 10:38:18 +01:00
Daniel Hofstetter
74ed737460
remove NAME constants
2023-01-12 15:21:11 +01:00
Terts Diepraam
4d52449667
shuf: update to clap 4
2022-10-13 17:50:40 +02:00
Terts Diepraam
f15c4f2d3e
Version 0.0.16
2022-10-11 23:03:39 +02:00
Daniel Hofstetter
9e8daf92dd
Replace deprecated value_of() with get_one()
2022-09-26 16:42:42 +02:00
Terts Diepraam
975a1d170d
change remaining usage codes of 2 to 1 for GNU compat
2022-09-10 20:24:24 +02:00
Terts Diepraam
15180249fc
Version 0.0.15
2022-08-20 13:13:22 +02:00
Terts Diepraam
ba713b6365
Simplify invalid encoding handling into two small methods of Args
...
The previous encoding handling was unnecessarily complex. This commit removes the enum that specifies the handling and instead has two separate methods to collect the strings either with lossy conversion or by ignoring invalidly encoded strings.
2022-08-17 15:20:20 +02:00
Terts Diepraam
5621502a95
all: remove accept_{any, complete, lossy}
and ConversionResult
...
Outside of tests, only `accept_any` was used, meaning that this unnecessarily complicated the code. The behaviour of `accept_any` is now the default (and only) option.
2022-08-17 14:57:28 +02:00
Daniel Hofstetter
c0c26c4c58
Replace deprecated values_of() with get_many()
2022-08-11 13:49:09 +02:00
Daniel Hofstetter
7c3116330e
Replace deprecated is_present() with contains_id()
2022-08-02 15:21:39 +02:00
Daniel Hofstetter
fc4544c42b
bump clap from 3.1.18 to 3.2.15
2022-07-29 14:05:02 +02:00
Daniel Hofstetter
62d9305785
shuf: add missing spaces to about text
2022-06-27 09:21:48 +02:00
Sylvestre Ledru
7c49bf4bd1
the cat /dev/random can be too long, use the Shakespeare text
2022-06-19 16:59:44 +02:00
Sylvestre Ledru
ad05b2f7cb
Ignore word "tmpfs"
2022-06-18 08:32:40 +02:00
Christian Menges
35e97fe88a
shuf: update BENCHMARKING.md
...
Signed-off-by: Christian Menges <christian.menges@outlook.com>
2022-06-17 20:57:04 +02:00
Christian Menges
19a43bf1b7
shuf: improve performance
...
Use memchr crate to speed up splitting input data by a separator.
Signed-off-by: Christian Menges <christian.menges@outlook.com>
2022-06-16 13:23:44 +02:00
Terts Diepraam
eae07adfb1
Version 0.0.14 ( #3553 )
...
Version 0.0.14
2022-05-22 19:57:19 +02:00