Sylvestre Ledru
9c813be5f1
Merge pull request #3076 from jfinkels/dd-seek-truncate
...
dd: truncate to specified seek length
2022-02-08 11:16:15 +01:00
Justin Tracey
b873d46ca0
join: flush stdout before final error message
2022-02-07 22:32:02 -05:00
Justin Tracey
bf67c5d981
join: add tests for --check-order and stdout error
2022-02-07 22:26:27 -05:00
Narasimha Prasanna HN
0379fca260
Fix merge conflict in tests/by-util/test_cp.rs
2022-02-07 23:26:06 +05:30
Jeffrey Finkelstein
9f8ec676c5
dd: show warning if skipping past end of input
...
Show a warning if the `skip=N` command-line argument would cause `dd`
to skip past the end of the input. For example:
$ printf "abcd" | dd bs=1 skip=5 count=0 status=noxfer
'standard input': cannot skip to specified offset
0+0 records in
0+0 records out
2022-02-06 20:10:42 -05:00
Jeffrey Finkelstein
e5361a8c11
split: correct error message on invalid arg. to -a
...
Correct the error message displayed on an invalid parameter to the
`--suffix-length` or `-a` command-line option.
2022-02-06 20:09:29 -05:00
Jeffrey Finkelstein
fec662a623
dd: show warning when using 0x size multiplier
...
Show a warning when a block size includes "0x" since this is
ambiguous: the user may have meant "multiply the next number by zero"
or they may have meant "the following characters should be interpreted
as a hexadecimal number".
2022-02-06 17:13:15 -05:00
Sylvestre Ledru
1f7c08d87b
Merge pull request #3028 from jfinkels/dd-multipliers
...
dd: add support for 'b' and 'x' multipliers in numeric arguments
2022-02-06 22:03:54 +01:00
Sylvestre Ledru
16b397a648
Merge pull request #3029 from hbina/hbina-test_ls_order_time-is-flaky
...
test_ls: Do not rely on the system time of metadata'access time
2022-02-06 22:03:31 +01:00
Sylvestre Ledru
1ac45c9961
Merge pull request #3044 from water-ghosts/cp-dir-vs-file
...
cp: Fail when copying a directory to a file
2022-02-06 22:01:37 +01:00
Andreas Molzer
a2e9329918
seq: Allow option to receive immediate arguments
...
WIP: this needs to be adjusted
2022-02-06 09:45:38 -06:00
Andreas Molzer
66733ca994
seq: Add difficult cases to test suite
2022-02-06 09:45:37 -06:00
Jeffrey Finkelstein
1af709f642
dd: truncate to specified seek length
...
When specifying `seek=N` and *not* specifying `conv=notrunc`, truncate
the output file to `N` blocks instead of truncating it to zero before
starting to write output. For example
$ printf "abc" > outfile
$ printf "123" | dd bs=1 skip=1 seek=1 count=1 status=noxfer of=outfile
1+0 records in
1+0 records out
$ cat outfile
a2
Fixes #3068 .
2022-02-05 16:07:44 -05:00
Sylvestre Ledru
2ffc5f9e13
Merge pull request #3070 from water-ghosts/printf-0
...
printf: Support leading zeroes with %0n formatting
2022-02-05 21:02:16 +01:00
Sylvestre Ledru
252e30c839
Merge pull request #3046 from hbina/hbina-tail-head-dont-use-is-numeric-to-check-digits
...
tail&head: dont use is_numeric to check for digits
2022-02-05 10:08:01 +01:00
Eli Youngs
162f85773e
printf: Support leading zeroes with %0n formatting
2022-02-05 00:43:09 -08:00
Allan Silva
6a6875012e
wc: implement files0-from option
...
When this option is present, the files argument is not processed. This option processes the file list from provided file, splitting them by the ascii NUL (\0) character. When files0-from is '-', the file list is processed from stdin.
2022-02-04 10:12:08 -03:00
Hanif Ariffin
793d3dd97c
test_printf: add test for additional escape (\c)
...
Using this escaped character will cause `printf` to stop generating characters.
For instance,
```rust
hbina@akarin ~/g/uutils (hbina-add-test-for-additional-escape)> cargo run --quiet -- printf "%s\c%s" a b
a⏎
```
Signed-off-by: Hanif Ariffin <hanif.ariffin.4326@gmail.com>
2022-02-04 18:47:23 +08:00
Sylvestre Ledru
b4c85b2c17
Merge pull request #2997 from tertsdiepraam/cp-allow-hyphen-suffix
...
`uucore`: allow backup suffix with hyphen value
2022-02-04 10:29:21 +01:00
Sylvestre Ledru
033fd62f6a
Merge pull request #3047 from hbina/hbina-touch-better-msg-when-no-args
...
touch: Better error messages when no args is provided
2022-02-04 10:27:01 +01:00
Jeffrey Finkelstein
3fbaa79359
dd: add support for 'b' and 'x' multipliers
...
Support the suffix 'b' (multiply by 512) and 'x' (multiply by an
arbitrary amount) when specifying numeric arguments to dd.
2022-02-03 21:56:13 -05:00
snobee
f7e31f6008
stat: allow formatting of negative numbers
2022-02-03 16:01:19 -08:00
Hanif Ariffin
e60b581c38
test_sort: Preserve the environment variable when executing tests ( #3031 )
...
* test_sort: Output sorted files to a file with different name
Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.43262@gmail.com>
* Fix the test by saving the environment variable
Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.43262@gmail.com>
Co-authored-by: Hanif Bin Ariffin <hanif.ariffin.43262@gmail.com>
2022-02-03 16:02:50 +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
snobee
ee721ebf4e
head: handle multibyte numeric utf-8 chars
2022-02-03 21:42:22 +08:00
Hanif Ariffin
9cd65c766a
Add tests
...
Signed-off-by: Hanif Ariffin <hanif.ariffin.4326@gmail.com>
2022-02-03 21:14:56 +08:00
Hanif Bin Ariffin
c4c666814b
Merge branch 'main' of github.com:uutils/coreutils into hbina-test_ls_order_time-is-flaky
2022-02-03 19:57:13 +08:00
Sylvestre Ledru
2d3b8db9ed
Merge pull request #3012 from shoriminimoe/2951-truncate
...
truncate: change cli error return code
2022-02-03 10:43:16 +01:00
Eli Youngs
d50c9c3e77
Fail when copying a directory to a file
2022-02-02 23:59:32 -08:00
Sylvestre Ledru
b411d91fac
Merge pull request #3014 from HeroicKatora/main
...
Make true return false less frequently
2022-02-02 21:43:21 +01:00
Sylvestre Ledru
64f3cd748d
Merge pull request #2976 from danieleades/lint
...
add additional lints
2022-02-02 09:55:57 +01:00
Eli Youngs
45751e9e48
cp: Create backup before hardlink
2022-02-01 23:49:39 -08:00
Narasimha Prasanna HN
be6287e3e3
Fix: Avoid infinite recursive copies when source and destination directories are same or source is a prefix of destination
2022-02-02 11:17:53 +05:30
Hanif Bin Ariffin
560cd74a63
test_ls: Do not rely on the system time of metadata'access time
...
Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.43262@gmail.com>
2022-02-02 12:49:40 +08:00
Sam Caldwell
ea5541db56
truncate: add test_invalid_option
2022-02-01 13:42:50 -07:00
Terts Diepraam
87e582b5e0
Merge pull request #2977 from Dr-Emann/echo_octal_nul
...
echo: Allow echo with escapes to work with `\0`
2022-02-01 20:13:53 +01:00
Andreas Molzer
23a544c485
false,true: Implement custom help, version
...
This avoids hacking around the short options of these command line
arguments that have been introduced by clap. Additionally, we test and
correctly handle the combination of both version and help. The GNU
binary will ignore both arguments in this case while clap would perform
the first one. A test for this edge case was added.
2022-02-01 14:29:26 +01:00
Andreas Molzer
149399c1bf
false,true: Add by-util tests for options
2022-02-01 13:02:18 +01:00
Terts Diepraam
08f1199b08
ls: fix flaky test test_ls_io_errors
2022-02-01 10:55:15 +01:00
Terts Diepraam
7fc82cd376
Merge pull request #2902 from jtracey/join-non-unicode-sep
...
join: add support for non-unicode field separators
2022-01-31 21:54:56 +01:00
Terts Diepraam
7477761428
Merge pull request #2882 from jtracey/join-bigfields-compat
...
join: "support" field numbers larger than usize::MAX
2022-01-31 21:52:13 +01:00
Daniel Eades
4f8d1c5fcf
add additional lints
2022-01-31 20:40:47 +01:00
Sylvestre Ledru
829e4fcb2c
Merge pull request #2970 from tertsdiepraam/ls-fix-flaky-test
...
`ls`: fix flaky test
2022-01-31 14:26:40 +01:00
Terts Diepraam
184b65df20
uucore: allow backup suffix with hyphen value
2022-01-31 12:10:57 +01:00
Zachary Dremann
f75466bb31
tests/paste: Add test to avoid trimming extra whitespace
2022-01-30 23:03:11 -05:00
Zachary Dremann
fa44957a63
paste: Handle unicode delimiters
2022-01-30 23:00:49 -05:00
Jeffrey Finkelstein
cba0696b90
head: don't add trailing newline to end of file
...
Prevent `head` from adding a trailing newline to the end of a file
that did not originally have one when using `head --lines=-0`.
2022-01-30 22:04:19 -05:00
Jeffrey Finkelstein
fe5b537f56
truncate: error when trying to truncate a fifo
...
Terminate the `truncate` program with an error message when trying to
truncate a named pipe (also known as a fifo).
2022-01-30 22:03:12 -05:00
Justin Tracey
58d65fb953
join: add support for non-unicode field separators
...
This allows for `-t` to take invalid unicode (but still single-byte) values
on unix-like platforms. Other platforms, which as of the time of this commit
do not support `OsStr::as_bytes()`, could possibly be supported in the future,
but would require design decisions as to what that means.
2022-01-30 20:04:22 -05:00
Terts Diepraam
96d3a95a39
test: fix wsl executable permission
2022-01-31 00:22:21 +01:00
Zachary Dremann
d6a0b3c920
Allow echo with escapes to work with \0
...
Testing with gecho on macos outputs a nul character for a \0
2022-01-30 17:24:29 -05:00
Terts Diepraam
e01e2141f5
ls: fix flaky test ( #2969 )
2022-01-30 20:09:20 +01:00
Daniel Eades
ba45fe312a
use 'Self' and derive 'Default' where possible
2022-01-30 15:08:26 +01:00
Daniel Eades
2f85610cc3
remove explicit iter loops
2022-01-30 15:08:26 +01:00
Daniel Eades
784f2e2ea1
use semicolons if nothing returned
2022-01-30 15:08:26 +01:00
Daniel Eades
a2d5f06be4
remove needless pass by value
2022-01-30 15:08:26 +01:00
Daniel Eades
f4c6ea0ee8
remove unnecessary 'to_owned'
2022-01-30 14:01:21 +01:00
Daniel Eades
191e29f951
simplify some boolean operations
2022-01-30 14:01:21 +01:00
Daniel Eades
f2074140ec
use 'char' instead of 'str' for single character patterns
2022-01-30 14:01:21 +01:00
Daniel Eades
5af66753af
remove needless borrows
2022-01-30 14:01:21 +01:00
Sylvestre Ledru
81b2a240e6
Merge pull request #2960 from water-ghosts/fix-cp-a-panic
...
Don't panic when calling cp -a with a nonexistent file
2022-01-30 11:30:56 +01:00
Sylvestre Ledru
bfa2d8b7da
Merge pull request #2875 from kimono-koans/ls_bad_fd_2
...
ls: Fix display of bad file descriptor errors
2022-01-30 09:59:58 +01:00
Sylvestre Ledru
7c1abdb7d9
Merge pull request #2866 from jfinkels/split-number-2
...
split: implement -n option
2022-01-30 09:58:04 +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
Eli Youngs
71c889116e
Fix formatting and unused variable checks
2022-01-30 00:33:06 -08:00
Eli Youngs
680e9081fe
Don't panic when calling cp -a with a nonexistent file
2022-01-29 22:59:53 -08:00
Sylvestre Ledru
1dcd3b2c24
Merge pull request #2943 from jfinkels/truncate-no-such-dir
...
truncate: better error msg when dir does not exist
2022-01-29 12:25:38 +01:00
Sylvestre Ledru
52ab6325a0
Merge pull request #2881 from jtracey/join-null-field-sep
...
join: add support for `-t '\0'`
2022-01-29 10:55:04 +01:00
Sylvestre Ledru
24744ca42b
Merge pull request #2911 from jfinkels/dd-seek-stdout
...
dd: support seek=N when destination is stdout
2022-01-29 10:47:17 +01:00
Sylvestre Ledru
57ee6b5302
Merge branch 'main' into truncate-no-such-dir
2022-01-29 09:58:17 +01:00
Sylvestre Ledru
cbc7da3d7d
Merge pull request #2936 from tertsdiepraam/clap-infer-long-args
...
all: enable infer long arguments in clap
2022-01-29 09:57:15 +01:00
Jeffrey Finkelstein
0454d3b243
truncate: prevent underflow when reducing size
...
Prevent usize underflow when reducing the size of a file by more than
its current size. For example, if `f` is a file with 3 bytes, then
truncate -s-5 f
will now set the size of the file to 0 instead of causing a panic.
2022-01-28 22:44:07 -05:00
Jeffrey Finkelstein
c780c96e17
truncate: better error msg when dir does not exist
...
Improve the error message that gets printed when a directory does not
exist. After this commit, the error message is
truncate: cannot open '{file}' for writing: No such file or directory
where `{file}` is the name of a file in a directory that does not
exist.
2022-01-28 21:21:37 -05:00
Terts Diepraam
2412e4cbf7
add some tests for Clap's InferLongArgs setting
2022-01-29 02:06:32 +01:00
Sylvestre Ledru
f1d72018d7
Merge pull request #2923 from jfinkels/seq-error-zero-increment-value
...
seq: correct error message for zero increment
2022-01-29 01:25:57 +01:00
Sylvestre Ledru
c702154a84
Merge pull request #2934 from jfinkels/truncate-division-by-zero
...
truncate: add a division by zero error
2022-01-29 01:25:10 +01:00
Sylvestre Ledru
fed5ca4ba9
Merge pull request #2935 from tertsdiepraam/wc-unusual-files
...
wc: fix counting files from pseudo-filesystem
2022-01-29 01:09:02 +01:00
Terts Diepraam
dd311b294b
wc: fix counting files from pseudo-filesystem
2022-01-28 19:08:44 +01:00
Jeffrey Finkelstein
9dda23d8c6
seq: correct error message for zero increment
...
Change a word in the error message displayed when an increment value
of 0 is provided to `seq`. This commit changes the message from "Zero
increment argument" to "Zero increment value" to match the GNU `seq`
error message.
2022-01-27 21:17:27 -05:00
Jeffrey Finkelstein
b636ff04a0
split: implement -n option
...
Implement the `-n` command-line option to `split`, which splits a file
into a specified number of chunks by byte.
2022-01-27 21:16:27 -05:00
Jeffrey Finkelstein
1e5e637990
truncate: add a division by zero error
...
Add an error for division by zero. Previously, running `truncate -s /0
file` or `-s %0` would panic due to division by zero. After this
change, it writes an error message "division by zero" to stderr and
terminates with an error code.
2022-01-27 21:12:59 -05:00
Sylvestre Ledru
b816e80e2f
Merge pull request #2912 from jfinkels/truncate-create-non-existent-file
...
truncate: create non-existent file by default
2022-01-27 23:03:55 +01:00
electricboogie
8b6c1337aa
Fix broken test in certain Linux containers
2022-01-27 15:36:55 -06:00
Jeffrey Finkelstein
4fbe2b2b5e
seq: implement -f FORMAT option
...
Add support for the `-f FORMAT` option to `seq`. This option instructs
the program to render each value in the generated sequence using a
given `printf`-style floating point format. For example,
$ seq -f %.2f 0.0 0.1 0.5
0.00
0.10
0.20
0.30
0.40
0.50
Fixes issue #2616 .
2022-01-25 20:48:26 -05:00
Sylvestre Ledru
f1dde86f9b
Merge pull request #2903 from jtracey/ls-test-clippy
...
ls: fix clippy lints in tests
2022-01-25 23:24:40 +01:00
Sylvestre Ledru
c7fc0a703b
Merge pull request #2893 from g-k/2888-rand-0.8
...
update rand crate to 0.8
2022-01-25 23:23:43 +01:00
Sylvestre Ledru
5c45911c13
Merge pull request #2915 from jfinkels/dd-status-noxfer
...
dd: correct behavior when status=noxfer
2022-01-25 23:19:53 +01:00
Jeffrey Finkelstein
e8df666c2e
dd: support seek=N when destination is stdout
...
Add support for the `seek=N` argument when the destination is stdout
and not a file. Previously, the argument was ignored when writing to
stdout.
2022-01-25 12:34:13 -05:00
Sylvestre Ledru
630b5d8577
Merge pull request #2909 from jfinkels/dd-conv-ascii-unblock
...
dd: block/unblock on ebcdic/ascii conversions
2022-01-25 14:37:20 +01:00
Sylvestre Ledru
1415ebc263
Merge pull request #2908 from cohosh/join_chkodr_default
...
join: fix default check order behaviour
2022-01-25 13:47:34 +01:00
Sylvestre Ledru
c74cfdc33e
Merge pull request #2916 from jfinkels/tail-follow-non-utf8-bytes
...
tail: don't error when following non-UTF-8 data
2022-01-25 13:47:16 +01:00
Sylvestre Ledru
e6733881d6
Merge pull request #2850 from sbentmar/numfmt-error-handling
...
numfmt: use UResult in more functions
2022-01-25 13:46:46 +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
Greg Guthe
1e0dc6c278
tests: update test_random to take range
...
Fix 'error[E0061]: this function takes 1 argument but 2 arguments were supplied'.
2022-01-24 20:40:31 -05:00
Greg Guthe
771c9f5d9c
tests: update random_chars generator to map u8 to char
...
Fix 'value of type `char` cannot be built from `std::iter::Iterator<Item=u8>`' for split test.
refs: https://docs.rs/rand/0.8.4/rand/distributions/struct.Alphanumeric.html#example
2022-01-24 20:40:31 -05:00
Jeffrey Finkelstein
80ac2619e4
dd: correct behavior when status=noxfer
...
Correct the behavior of `dd` with the `status=noxfer` option. Before
this commit, the status output was entirely suppressed (as happens
with `status=none`). This was incorrect behavior. After this commit,
the input/output counts are printed to stderr as expected.
For example,
$ printf "" | dd status=noxfer
0+0 records in
0+0 records out
This commit also updates a unit test that was enforcing the wrong
behavior.
2022-01-23 17:36:14 -05:00
Terts Diepraam
d2fe245192
Merge pull request #2502 from hbina/hbina-tr-reimplement-expansion
...
`tr`: Expanding expansion module
2022-01-23 19:08:00 +01:00
Jeffrey Finkelstein
129cfe12b8
truncate: create non-existent file by default
...
Fix the behavior of truncate when given a non-existent file so that it
correctly creates the file before truncating it (unless the
`--no-create` option is also given).
2022-01-23 11:24:53 -05:00
Jeffrey Finkelstein
1c8df122d7
dd: block/unblock on ebcdic/ascii conversions
...
Update `dd` so that the conversion `conv=ascii` implies `conv=unblock`
and, symmetrically, the conversion `conv=ebcdic` implies `conv=block`.
2022-01-23 09:57:37 -05:00
Cecylia Bocovich
c8f9ea5b15
tests/join: test default check order behaviour
2022-01-22 17:51:29 -05:00
Cecylia Bocovich
594157d1e0
join: fix default check order behaviour
...
If neither --nocheck-order or --check-order are specified, only fail on
unsorted inputs if either file contains unpaired lines.
2022-01-22 17:51:29 -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
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
Justin Tracey
b65815cd06
ls: fix clippy lints in tests
2022-01-21 15:56:42 -05:00
Cecylia Bocovich
67878de379
join: print unsorted line in error message
...
This expands the error message that is printed if either input file has
an unsorted line. Both the program name (join) and the offending line
are printed out with the message to match the behaviour of the GNU
utility.
2022-01-21 11:47:37 -05:00
Terts Diepraam
9ddd61ab6b
Merge branch 'main' into hbina-tr-reimplement-expansion
2022-01-21 14:42:30 +01:00
Terts Diepraam
55a47f6fc0
Merge pull request #2863 from tertsdiepraam/clap-3
...
Clap 3
2022-01-20 23:14:52 +01:00
Sylvestre Ledru
0c34e35fdb
Merge pull request #2896 from tertsdiepraam/flaky-tr-test
...
`tr`: fix flaky test
2022-01-20 21:53:27 +01:00
Terts Diepraam
9f649ffe9b
tr: fix flaky test
2022-01-19 22:33:54 +01:00
Terts Diepraam
da728dd2b6
Merge branch 'main' into hbina-tr-reimplement-expansion
2022-01-19 19:34:13 +01: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
Terts Diepraam
77229aea86
ls: fix tests for windows
2022-01-18 13:47:50 +01:00
Terts Diepraam
270a6ee83e
rm: fix 3 leading hyphens for ---presume-input-tty
2022-01-18 12:54:50 +01:00
Justin Tracey
ce3df12eaa
join: "support" field numbers larger than usize::MAX
...
They silently get folded to usize::MAX, which is the official GNU behavior.
2022-01-17 17:49:41 -05:00
electricboogie
4bee6526bf
Add new test, never print error on deref-ed bad fd
2022-01-17 13:14:43 -06:00
Jeffrey Finkelstein
e575007629
tail: improve error handling when file not found
2022-01-17 10:57:24 -05:00
sbentmar
413bff26f8
numfmt: ignore stdin write error
2022-01-17 16:24:40 +01:00
sbentmar
328cf4d91b
numfmt: add more negative tests
2022-01-17 16:24:40 +01:00
Sebastian Holgersson
9b04c98ddb
numfmt: use UResult in more functions
...
This commit replaces generic Results with UResults in some key
functions in numfmt. As a result of this, we can provide different
exit codes for different errors, which resolves ~70 failing test
cases in the GNU numfmt.pl test suite.
2022-01-17 16:24:40 +01:00
Terts Diepraam
8872485922
Merge branch 'main' into clap-3
2022-01-17 13:25:51 +01:00
Terts Diepraam
08efa1fe5a
Merge branch 'main' into join-null-field-sep
2022-01-17 12:59:52 +01:00
Justin Tracey
109277d405
join: add support for -t '\0'
2022-01-16 18:05:58 -05:00
Justin Tracey
346415e1d2
join: add support for -z option
2022-01-16 17:56:07 -05:00
Sylvestre Ledru
516bdfcfd5
Merge pull request #2872 from jfinkels/split-verbose
...
split: add --verbose option
2022-01-16 23:19:30 +01:00
electricboogie
e1bffea595
Merge branch 'master' into ls_bad_fd_2
2022-01-16 10:26:44 -06:00
electricboogie
15efba54c5
Use dir_entry metadata for dereferenced bad fds to match GNU, add comments, clippy lints
2022-01-16 10:20:50 -06:00
Sylvestre Ledru
00c11b184f
Merge pull request #2851 from jtracey/join-strless
...
join: operate on bytes instead of Strings
2022-01-16 16:24:38 +01:00
Terts Diepraam
448b84806f
fix Rust 1.58 clippy lints ( #2874 )
2022-01-16 15:57:33 +01:00
Jeffrey Finkelstein
7af3007204
split: add --verbose option
2022-01-16 09:34:28 -05:00
electricboogie
37ca6edfdc
Fix display of bad fd errors
2022-01-15 22:39:07 -06:00
kimono-koans
fd5310411e
ls: Fix device display ( #2855 )
2022-01-15 00:39:56 +01:00
Sylvestre Ledru
3cc1fb593a
Merge pull request #2859 from jfinkels/split-dynamic-suffix-length
...
split: correct filename creation algorithm
2022-01-14 18:06:57 +01:00
Terts Diepraam
e3b8e6c993
who: clap 3
2022-01-11 19:16:48 +01:00
Terts Diepraam
0fca4460de
stdbuf: clap 3
2022-01-11 19:16:48 +01:00
Terts Diepraam
b43839a8a8
sort: clap 3
2022-01-11 19:16:48 +01:00
Terts Diepraam
793e540323
shuf: clap 3
2022-01-11 19:16:48 +01:00
Terts Diepraam
283973c5bf
rm: clap 3
2022-01-11 19:16:48 +01:00
Terts Diepraam
c39a9b49d4
pinky: clap 3
2022-01-11 19:16:48 +01:00
Terts Diepraam
6e39eddbc1
mknod: clap 3
2022-01-11 19:16:47 +01:00
Terts Diepraam
0531f13cfd
link: clap 3
2022-01-11 19:16:47 +01:00
Terts Diepraam
89112fb1c2
install: clap 3
2022-01-11 19:16:47 +01:00
Sylvestre Ledru
6723a54610
Merge pull request #2862 from rivy/fix.whitespace
...
refactor/polish ~ whitespace fixup
2022-01-11 17:51:37 +01:00
kimono-koans
016d5e72ad
ls: Fix padding for dangling links in non-Long formats ( #2856 )
...
* Fix padding for dangling links in non-long formats
Co-authored-by: electricboogie <32370782+electricboogie@users.noreply.github.com>
2022-01-11 12:01:54 +01:00
Jeffrey Finkelstein
cfe5a0d82c
split: correct filename creation algorithm
...
Fix two issues with the filename creation algorithm. First, this
corrects the behavior of the `-a` option. This commit ensures a
failure occurs when the number of chunks exceeds the number of
filenames representable with the specified fixed width:
$ printf "%0.sa" {1..11} | split -d -b 1 -a 1
split: output file suffixes exhausted
Second, this corrects the behavior of the default behavior when `-a`
is not specified on the command line. Previously, it was always
settings the filenames to have length 2 suffixes. This commit corrects
the behavior to follow the algorithm implied by GNU split, where the
filename lengths grow dynamically by two characters once the number of
chunks grows sufficiently large:
$ printf "%0.sa" {1..91} | ./target/debug/coreutils split -d -b 1 \
> && ls x* | tail
x81
x82
x83
x84
x85
x86
x87
x88
x89
x9000
2022-01-10 20:43:22 -05:00
Terts Diepraam
f60c36f242
Merge pull request #2610 from miDeb/cp/abuse
...
cp: handle edge cases when dest is a symlink
2022-01-11 00:34:55 +01:00
Roy Ivy III
7a760cae99
refactor/polish ~ re-normalize whitespace
...
* minimize inconsistent/invisible whitespace
- consistent indentation (either spaces-only, tabs, *or* tabs with following spaces [for indentation])
- no internal/invisible tabs
- no trailing whitespace
- EOF EOLNs
2022-01-09 21:35:39 -06:00
Sylvestre Ledru
dcfdeb334d
Merge pull request #2854 from kimono-koans/ls_fix_errno_1
...
ls: Fix Errno 1, print errors at the md call point
2022-01-09 20:56:06 +01:00
moko256
5659bf8fae
ls: On Windows use DirEntry#metadata() instead of fs::metadata
2022-01-10 02:56:22 +09:00
Justin Tracey
4df2f3c148
join: add test for non-Unicode files
2022-01-08 21:28:29 -05:00
Justin Tracey
cdfe64369d
join: add test for non-linefeed newline characters
2022-01-08 19:51:16 -05:00