Sylvestre Ledru
54a10e955a
Update of the cargo.lock url to point to the right branch
2022-03-06 22:13:17 +01:00
Davide Cavalca
19af43222b
Include license text in all published crates
2022-03-05 21:21:46 +01:00
Omer Tuchfeld
5d861df961
Fix type-error when calling parse_size
from tail
2022-02-22 13:49:20 +01:00
Terts Diepraam
53070141c1
all: add format_usage function ( #3139 )
...
This should correct the usage strings in both the `--help` and user documentation. Previously, sometimes the name of the utils did not show up correctly.
2022-02-21 17:14:03 +01:00
Sylvestre Ledru
0ed5e2c884
Merge pull request #2957 from jfinkels/head-preserve-no-final-newline
...
head: don't add trailing newline to end of file that didn't originally have one
2022-02-12 19:03:13 +01:00
Hanif Bin Ariffin
3586465917
dont use is_numeric to check for digits
...
Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.43262@gmail.com>
2022-02-03 21:42:22 +08:00
Daniel Eades
4f8d1c5fcf
add additional lints
2022-01-31 20:40:47 +01:00
Jeffrey Finkelstein
b9c2066ee9
uucore: move lines.rs to be a uucore feature
...
Refactor the `lines.rs` module to be a feature in `uucore`. It was
common to both `head` and `tail`.
2022-01-30 22:15:35 -05:00
Daniel Eades
ba45fe312a
use 'Self' and derive 'Default' where possible
2022-01-30 15:08:26 +01:00
Daniel Eades
784f2e2ea1
use semicolons if nothing returned
2022-01-30 15:08:26 +01:00
Sylvestre Ledru
b8b642101f
Merge pull request #2898 from jfinkels/tail-lines-zero-terminated
...
tail: support zero-terminated lines in streams
2022-01-30 09:44:04 +01:00
Terts Diepraam
eb82015b23
all: change macros
...
- Change the main! proc_macro to a bin! macro_rules macro.
- Reexport uucore_procs from uucore
- Make utils to not import uucore_procs directly
- Remove the `syn` dependency and don't parse proc_macro input (hopefully for faster compile times)
2022-01-29 15:26:32 +01:00
Terts Diepraam
9c8e865b55
all: enable infer long arguments in clap
2022-01-29 02:06:29 +01:00
Sylvestre Ledru
7f79fef2cd
fix various doc warnings
2022-01-29 00:09:09 +01:00
Jeffrey Finkelstein
83f96ec29d
tail: don't error when following non-UTF-8 data
...
Fix a bug where `tail -f` would terminate with an error due to failing
to parse a UTF-8 string from a sequence of bytes read from the
followed file. This commit replaces the call to `BufRead::read_line()`
with a call to `BufRead::read_until()` so that any sequence of bytes
regardless of encoding can be read.
Fixes #1050 .
2022-01-24 21:32:52 -05:00
Jeffrey Finkelstein
f595edaded
tail: fix a bug in tail [ -n | -c ] +NUM <file>
...
Fix a bug when getting all but the first NUM lines or bytes of a file
via `tail -n +NUM <file>` or `tail -c +NUM <file>`. The bug only
existed when a file is given as an argument; it did not exist when the
input data came from stdin.
2022-01-21 19:05:53 -05:00
Jeffrey Finkelstein
d27d6bc32c
split: add forwards_thru_file() helper function
...
Add helper function `forwards_thru_file()` that finds the index in a
reader of the byte immediately following the `n`th instance of a given
byte.
2022-01-21 18:33:15 -05:00
Jeffrey Finkelstein
58d84d5107
tail: support zero-terminated lines in streams
...
Support `-z` option when the input is not a seekable file. Previously,
the option was accepted by the argument parser, but it was being
ignored by the application logic.
2022-01-21 18:31:15 -05:00
Terts Diepraam
55a47f6fc0
Merge pull request #2863 from tertsdiepraam/clap-3
...
Clap 3
2022-01-20 23:14:52 +01:00
Roy Ivy III
2e251f91f1
0.0.12
2022-01-19 05:35:00 -06:00
Jeffrey Finkelstein
ca812a7558
tail: rm trailing \n if input doesn't end with one
...
Fix a bug where `tail` would inappropriately add a newline to the last
line of output even though the input did not end with one.
2022-01-18 17:34:41 -05:00
Jeffrey Finkelstein
e575007629
tail: improve error handling when file not found
2022-01-17 10:57:24 -05:00
Terts Diepraam
8872485922
Merge branch 'main' into clap-3
2022-01-17 13:25:51 +01:00
Sylvestre Ledru
1fbda8003c
coreutils 0.0.8 => 0.0.9, uucore_procs 0.0.7 => 0.0.8, uucore 0.0.10 => 0.0.11
2022-01-16 17:05:48 +01:00
Terts Diepraam
9c9643807a
tail: clap 3
2022-01-11 19:16:48 +01:00
Roy Ivy III
774e72551b
change ~ relax 'nix' version and remove 'nix' patch
...
- code coverage compilation on MacOS latest (MacOS-11+) now works with newer 'nix' versions
2022-01-09 18:57:25 -06:00
Smicry
81a1fde9f4
tail use UResult
2021-11-21 12:37:56 +08:00
Roy Ivy III
03e0cbb020
update 'nix' within workspace to force patched version
2021-11-19 17:55:03 -06:00
Roy Ivy III
f20aa49821
maint/CICD ~ (GHA) fix cargo-udeps
false positives (add 'ignore' exceptions to sub-crates)
2021-11-19 17:55:02 -06:00
Smicry
fc851e036b
Implement tail -<number> ( #2747 )
...
And add obsolete_syntax test
2021-11-19 21:37:47 +01:00
Sylvestre Ledru
59e9870c56
Prepare version 0.0.8
2021-10-23 19:21:50 +02:00
Smicry
cb34b660cb
add tail usage
2021-10-19 00:15:17 +08:00
Sylvestre Ledru
7eaae75bfc
add a github action job to identify unused deps
2021-09-15 12:06:50 +02:00
Sylvestre Ledru
cca2b19b4e
tail: only set the winapi dep on Windows
2021-09-13 18:15:49 +02:00
Jan Scheer
cd0d23752a
tail: add fixes to pass "gnu/tests/tail-2/tail-c.sh" from GNU's test suite
2021-09-08 13:10:19 +02:00
Michael Debertol
252220e9eb
refactor/uucore ~ make util_name and execution_phrase functions
...
Since util_name and execution_phrase no longer rely on features that are
only available to macros, they may as well be plain functions.
2021-08-14 17:55:18 +02:00
Roy Ivy III
c5792c2a0f
refactor ~ use util_name!()
as clap::app::App name argument for all utils
2021-08-14 13:53:13 +02:00
Jeremy Soller
ed6a9d4c57
tail: remove unused redox platform
2021-08-06 13:56:20 -06:00
Jeremy Soller
0474a2eadd
more, tail, test: Update redox_syscall to 0.2
2021-08-06 13:56:20 -06:00
Sylvestre Ledru
24b1822cba
Merge pull request #2468 from thomasqueirozb/tail_stdin
...
tail: handle `-` as an alias for stdin
2021-08-02 00:24:28 +02:00
Thomas Queiroz
940559f0e1
tail: handle -
as an alias for stdin
2021-08-01 17:20:24 -04:00
Sylvestre Ledru
26a882551b
update the dep to uucore_procs 0.0.6
2021-07-11 21:04:11 +02:00
Sylvestre Ledru
1d8a66b7d3
Update to version 0.0.7
2021-07-11 18:04:56 +02:00
Michael Debertol
2ebca384c6
all utils: enable wrap_help
...
This makes clap wrap the help text according to the terminal width,
which improves readability for terminal widths < 120 chars,
because clap defaults to a width of 120 chars without this feature.
2021-06-27 16:17:10 +02:00
Michael Debertol
0531153fa6
uutils: move clap::App creation to separate functions
2021-06-25 21:23:45 +02:00
Jan Scheer
1b824f4914
fix clippy warnings
2021-06-09 15:56:29 +02:00
Jan Scheer
f8e96150f8
fix clippy warnings and spelling
...
* add some missing LICENSE headers
2021-06-04 15:39:34 +02:00
Jan Scheer
ad26b7a042
head/tail/split: make error handling of NUM/SIZE arguments more
...
consistent
* add tests for each flag that takes NUM/SIZE arguments
* fix bug in tail where 'quiet' and 'verbose' flags did not override each other POSIX style
2021-06-03 20:37:29 +02:00
Jan Scheer
cc659c8572
Merge branch 'master' of github.com:uutils/coreutils into refactoring_parse_size
2021-06-01 12:35:48 +02:00
Jan Scheer
3c7175f00d
head/tail: add fixes and tests for bytes/lines NUM arg (undocumented sign)
...
* change tail bytes/lines clap parsing to fix posix override behavior
* change tail bytes/lines NUM parsing logic to be consistent with head
2021-06-01 12:17:11 +02:00