Michael Debertol
74958794c6
chmod: print change message to stdout, not stderr
2021-08-25 13:52:09 +02:00
Michael Debertol
080998b6ef
chmod: pad all file modes to 4 digits
2021-08-25 13:52:09 +02:00
Jeffrey Finkelstein
52cfd4c6cb
hashsum: don't copy input buffer on Windows
...
Remove a copy operation of the input buffer being read for digest when
reading in text mode on Windows. Previously, the code was copying the
buffer to a completely new `Vec`, replacing "\r\n" with "\n". Instead,
the code now scans for the indices at which each "\r\n" occurs in the
input buffer and inputs into the digest only the characters before the
"\r" and after it.
2021-08-25 13:50:19 +02:00
Jan Verbeek
e5d6c6970b
yes: Cleanup
...
Report errors properly instead of panicking.
Replace zero_copy by a simpler specialized private module.
Do not assume splices move all data at once.
Use the modern uutils machinery.
Remove the "latency" feature. The time it takes to prepare the buffer
is drowned out by the startup time anyway.
yes: Add tests
yes: Fix long input test on Windows
2021-08-25 13:45:44 +02:00
Sylvestre Ledru
eb6ab9f883
Document some modules
2021-08-24 23:00:00 +02:00
Sylvestre Ledru
111d3e37bb
Merge pull request #2570 from miDeb/chgrp/no-duplication
...
chgrp/chown: move common code to `uucore`
2021-08-24 21:58:15 +02:00
Sylvestre Ledru
7c62337229
Merge pull request #2589 from devnexen/itmpx_netbsd
...
uucore netbsd update
2021-08-24 21:57:22 +02:00
Michael Debertol
ea41cc0ff6
uucore/fs: use the latest resolution that did not fail
...
When we ignore failures resolving symbolic links we should keep the
latest resolution that did not fail, not the original path.
2021-08-24 21:18:10 +02:00
Jan Verbeek
acfd1ebe57
fixup! Run clippy on the full workspace
2021-08-24 17:28:10 +02:00
Jan Verbeek
d06c074829
Run clippy on the full workspace
...
These lints were cluttering up the "problems" tab in my VS
Code. `--workspace` fixes the disparity.
2021-08-24 17:10:16 +02:00
Michael Debertol
4e251706be
refactor: move shared chown logic to uucore
2021-08-24 15:22:05 +02:00
Michael Debertol
7153a595c6
chgrp: forward to chown
...
chgrp does mostly the same as chown.
By making chown a bit more configurable we can reuse its code for chgrp.
2021-08-24 15:22:05 +02:00
Sylvestre Ledru
68c9bfa658
Merge pull request #2581 from sylvestre/freebsd
...
Use github action for FreeBSD testing and remove cirrus CI
2021-08-24 14:47:34 +02:00
Michael Debertol
91a8f533b6
Merge pull request #2582 from jfinkels/tac-multi-char-separator-overlap
...
tac: support multi-character line separator with possible overlaps
2021-08-24 12:03:45 +02:00
Jan Verbeek
516c5311f7
Close file descriptors of pipes after use ( #2591 )
...
* Close file descriptors of pipes after use
* cat: Test file descriptor exhaustion
* fixup! cat: Test file descriptor exhaustion
2021-08-24 12:00:07 +02:00
Sylvestre Ledru
1126013dbb
Remove unused variables on Freebsd
2021-08-24 09:32:27 +02:00
Jeffrey Finkelstein
0e689e78aa
tac: support multi-char separator with overlap
...
Fix a bug in `tac` where multi-character line separators would cause
incorrect behavior when there was overlap between candidate matches in
the input string. This commit adds a dependency on `memchr` in order to
use the `memchr::memmem::rfind_iter()` function to scan for
non-overlapping instances of the specified line separator characters,
scanning from right to left.
Fixes #2580 .
2021-08-23 20:16:38 -04:00
jfinkels
bdc0f4b7c3
hashsum: support --check for algorithms with variable output length ( #2583 )
...
* hashsum: support --check for var. length outputs
Add the ability for `hashsum --check` to work with algorithms with
variable output length. Previously, the program would terminate with an
error due to constructing an invalid regular expression.
* fixup! hashsum: support --check for var. length outputs
2021-08-23 18:35:19 +02:00
David Carlier
554d53c0ed
uucore netbsd update
...
fsext build fix and utmpx implementation proposal.
2021-08-23 16:21:18 +01:00
Sylvestre Ledru
b828e922e5
Merge pull request #2553 from miDeb/sort/race
...
sort: prevent race when deleting files
2021-08-22 22:49:57 +02:00
Sylvestre Ledru
9f3debeda3
Merge pull request #2534 from jfinkels/basename-handle-slashes
...
basename: handle paths comprising only slashes
2021-08-22 22:49:30 +02:00
Koutheir Attouchi
7010dfd939
runcon: added implementation and tests.
2021-08-22 21:59:41 +02:00
jfinkels
4ef35d4a96
tac: correct behavior of -b option ( #2523 )
...
* tac: correct behavior of -b option
Correct the behavior of `tac -b` to match that of GNU coreutils
`tac`. Specifically, this changes `tac -b` to assume *leading* line
separators instead of the default *trailing* line separators.
Before this commit, the (incorrect) behavior was
$ printf "/abc/def" | tac -b -s "/"
def/abc/
After this commit, the behavior is
$ printf "/abc/def" | tac -b -s "/"
/def/abc
Fixes #2262 .
* fixup! tac: correct behavior of -b option
* fixup! tac: correct behavior of -b option
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2021-08-22 21:01:17 +02:00
Sylvestre Ledru
114c9a409c
Merge pull request #2471 from miDeb/real-exe-name
...
make executable!() return the real executable name
2021-08-22 16:55:06 +02:00
Sylvestre Ledru
5089214832
bump a few crates to simplify Debian packaging (second)
2021-08-22 00:42:03 +02:00
Sylvestre Ledru
724f67c5d0
Merge pull request #2576 from sylvestre/bump-crates
...
bump a few crates to simplify Debian packaging
2021-08-22 00:29:00 +02:00
Sylvestre Ledru
8337aeb4d6
bump a few crates to simplify Debian packaging
2021-08-21 23:34:45 +02:00
Jeffrey Finkelstein
ecf59b173d
wc: fix collapsible match clippy warning
2021-08-21 17:24:10 -04:00
Michael Debertol
5e07d58a4d
Merge pull request #2459 from jaggededgedjustice/realpath-add-physical-mode
...
Add Physical mode to realpath
2021-08-21 02:01:10 +02:00
Michael Debertol
1eb7193ee8
wc: fix clippy lint
2021-08-20 00:00:48 +02:00
Tyler
20c63caa0c
Merge branch 'master' of github.com:backwaterred/coreutils into dedup-dd-mideb
2021-08-18 17:11:58 -07:00
Tyler
6f6f6251e9
dd: apply @miDeb patch to address issue #2572
2021-08-18 17:08:01 -07: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
Michael Debertol
5f2335829a
refactor ~ revert to single quotes for "Try '{0 --help'"
...
This is a test expectation for gnu.
2021-08-14 17:22:09 +02:00
Michael Debertol
6ab3d27c4e
fix ~ remove redundant clone()
...
util_name!() and execution_phrare!() now return a String directly
2021-08-14 14:48:38 +02:00
Michael Debertol
3039083521
refactor/uucore ~ mark executable!() as deprecated
...
Make sure that utilities do not use it anymore.
It is only allowed as an implementation detail of util_name!() and execution_phrase!()
2021-08-14 14:19:05 +02:00
Michael Debertol
813b477859
fix ~ fixes for newly added utilities
2021-08-14 14:10:35 +02:00
Michael Debertol
44981cab01
refactor/uucore ~ correct implementation of executable!() for multicall
...
- Use an atomic bool to track whether the utility name is the second
or the first argument.
- Add tests
2021-08-14 14:01:34 +02:00
Roy Ivy III
c0854000d1
refactor ~ use execution_phrase!()
for usage messaging
2021-08-14 14:01:33 +02:00
Roy Ivy III
318f366ace
change/uucore ~ add execution_phrase!()
macro for use with usage messages
2021-08-14 13:58:45 +02:00
Roy Ivy III
f56fc5bf44
refactor/uucore ~ use uucore args for executable macros
2021-08-14 13:58:45 +02:00
Roy Ivy III
69ce4dc8e5
refactor/uucore ~ align return values for executable/util macros
2021-08-14 13:58:45 +02:00
Roy Ivy III
eb13533e4e
refactor/uucore ~ replace executable_name!()
with util_name!()
in standard messaging
2021-08-14 13:58:45 +02:00
Roy Ivy III
23b68d80ba
refactor ~ usage()
instead of get_usage()
2021-08-14 13:58:43 +02:00
Roy Ivy III
894d9a068c
refactor ~ standardize on 'Try {} --help
...' messaging (common markdown-type formatting)
2021-08-14 13:55:11 +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
Roy Ivy III
fa5dc90789
refactor/uucore ~ improve macro scope hygiene
2021-08-14 13:51:36 +02:00
Roy Ivy III
ed240a7e50
fix/uucore ~ revise and fix msg macros and sub-macros
2021-08-14 13:51:36 +02:00
Roy Ivy III
065330c4ca
refactor/uucore ~ improve crash!()
(DRY use of exit!()
)
2021-08-14 13:51:36 +02:00
Roy Ivy III
27c4530f3c
refactor/uucore ~ reorganize macros into sections by 'type'
2021-08-14 13:51:36 +02:00
Roy Ivy III
be8f073217
refactor/uucore ~ add OsString support for executable!()
2021-08-14 13:51:36 +02:00
Michael Debertol
6f58da00dd
refactor/uucore ~ add util_name!()
; correct implementation of executable!()
2021-08-14 13:51:36 +02:00
Terts Diepraam
f9559fea80
Merge pull request #2569 from jtracey/master
...
join: add support for full outer joins
2021-08-13 14:38:15 +02:00
Justin Tracey
1bb0237281
join: add support for full outer joins
2021-08-12 23:52:35 -04:00
Sylvestre Ledru
a7797c01c0
Merge branch 'master' into chgrp/no-err
2021-08-13 01:35:21 +02:00
Sylvestre Ledru
01be7b356f
Merge pull request #2558 from fdanis-oss/fix-csplit-split_name
...
csplit: fix suffix support without flag
2021-08-13 01:34:30 +02:00
Sylvestre Ledru
ea5097e4a0
Merge pull request #2562 from tertsdiepraam/uucore/simpler-uerror
...
`uucore`: simpler `UResult` and `UError`
2021-08-13 01:33:23 +02:00
Sylvestre Ledru
5a0032c56e
Merge pull request #2563 from koutheir/master
...
chcon: reduce the number of unsafe blocks.
2021-08-13 01:32:42 +02:00
Sylvestre Ledru
8f55c79c9b
Merge pull request #2566 from miDeb/ls/width
...
ls: correct output width
2021-08-13 01:31:52 +02:00
Michael Debertol
21043d3605
sort: prevent race when deleting files
...
Move the creation of temporary files into next_file so that it happens
while the lock is taken.
Previously, only the computation of the new file path happened while
the lock was taken, while the creation happened later.
2021-08-12 13:50:56 +02:00
Frédéric Danis
6283dbe451
csplit: fix suffix support without flag
...
csplit fails when suffix has no flags:
$ csplit result.expected -f /tmp/EXPECT -b "%d" "/^## alternative ##$/" {*}
csplit: error: incorrect conversion specification in suffix
This is supported by original csplit
2021-08-12 10:27:56 +02:00
Michael Debertol
0af244ac42
ls: default to one-line output if stdout is not a tty
2021-08-11 22:03:41 +02:00
Michael Debertol
988cc49d4a
ls: print a single line when width is set to 0
...
This means that we treat a width=0 as infinite width.
2021-08-11 19:12:45 +02:00
Michael Debertol
13a62489c5
ls: correct fallbacks for terminal width
...
If options::WIDTH is not given, we should try to use the terminal width.
If that is unavailable, we should fall back to the 'COLUMNS' environment variable.
If that is unavailable (or invalid), we should fall back to a default of 80.
2021-08-11 19:12:37 +02:00
Michael Debertol
1c30fb42d2
chgrp: handle empty group
2021-08-11 19:03:41 +02:00
Koutheir Attouchi
83a515e4c3
chcon: reduce the number of unsafe blocks.
2021-08-10 13:50:51 -04:00
Terts Diepraam
14459cf611
rustfmt
2021-08-10 19:18:09 +02:00
Terts Diepraam
ea3c15f0dd
uucore: use default UError impl for UIoError
2021-08-10 17:55:37 +02:00
Terts Diepraam
d12d4f760c
uucore: {USimpleError, UUsageError}::new take Into<String> instead of String
2021-08-10 17:55:37 +02:00
Terts Diepraam
1649217116
uucore: remove distinction between common and custom errors
...
As custom errors are prefered over wrapping around common errors, the
distinction between UCommonError and UCustomError is removed. This
reduces the number of types and makes the error handling easier to
understand.
2021-08-10 17:55:28 +02:00
Sylvestre Ledru
fe539a6dea
Merge pull request #2559 from miDeb/factor/line-buffered
...
factor: prevent writing incomplete lines
2021-08-10 15:25:11 +02:00
Sylvestre Ledru
ca0bae0dfd
Merge pull request #2500 from Funky185540/feature/install-use-uresult
...
install: Use UResult
2021-08-10 13:32:00 +02:00
Michael Debertol
0edc9b01b9
factor: prevent writing incomplete lines
...
This makes it possible to execute multiple `factor` instances that write
to the same output in parallel, without having them interfere.
2021-08-10 00:14:51 +02:00
David CARLIER
6e2f6b2845
nice little code simplification, included already in the libc
...
for all unixes
2021-08-09 21:56:12 +01:00
Sylvestre Ledru
966cf79747
Merge pull request #2551 from uutils/od-hang
...
od: fix reading from file while supplying a format argument
2021-08-09 12:36:31 +02:00
Sylvestre Ledru
ee98efd92e
Merge pull request #2552 from miDeb/cat/show-crlf
...
cat: show `\r\n` as `^M$` when `-E` is enabled
2021-08-09 12:23:59 +02:00
Sylvestre Ledru
ecb042a9a3
Merge pull request #2554 from miDeb/cat/out_is_in
...
cat: check if the input file is also the output file
2021-08-09 12:23:46 +02:00
Michael Debertol
312e1ce9e0
chgrp: don't output an empty error
2021-08-09 01:33:02 +02:00
Dean Li
0f39e7c101
id: use UResult
2021-08-08 18:09:25 +08:00
Michael Debertol
03ceb6750e
cat: check if the input file is also the output file
2021-08-08 01:32:22 +02:00
Michael Debertol
7229360217
cat: remove all per-file state
...
cat cannot keep per-file state, so move all remaining state (one_blank_kept)
to the global state.
2021-08-07 23:04:25 +02:00
Michael Debertol
5be4c48546
cat: show \r\n as ^M$ when -E is enabled
...
This functionality was recently added to GNU cat, but had a bug.
This implementation will be commpatible with gnu once the bug in gnu is fixed.
2021-08-07 21:18:15 +02:00
Jeremy Soller
6af3f774f1
od: fix reading from file while supplying a format argument
...
The following test case read stdin instead of file:
```
echo abcdefg > file
cargo run -- od --format x1 file
```
This is because the -t/--format argument was able to absorb multiple
arguments after it. This has now been fixed, and a test case is added
to ensure it will not happen again.
2021-08-06 15:07:38 -06:00
Jeremy Soller
134c1aa407
ls: do not use gid2grp on redox
2021-08-06 13:56:20 -06:00
Jeremy Soller
cc0e1e3458
core/entries: disable missing group functions on redox
2021-08-06 13:56:20 -06:00
Jeremy Soller
ed6a9d4c57
tail: remove unused redox platform
2021-08-06 13:56:20 -06:00
Jeremy Soller
3601eaf176
core: only require dns-lookup when utmpx feature is required
2021-08-06 13:56:20 -06:00
Jeremy Soller
53374207c1
pr: remove unused utmpx feature
2021-08-06 13:56:20 -06:00
Jeremy Soller
27f53aa0df
dd: only require signal-hook on linux
2021-08-06 13:56:20 -06:00
Jeremy Soller
7d07ffc47d
date: disable setting time on redox
2021-08-06 13:56:20 -06:00
Jeremy Soller
318366c900
core/fsext: provide stub for read_fs_list on redox
2021-08-06 13:56:20 -06:00
Jeremy Soller
cbac771340
core/fs: remove unused import on redox
2021-08-06 13:56:20 -06:00
Jeremy Soller
d672fe098e
core/fsext: use statvfs on redox
2021-08-06 13:56:20 -06:00
Jeremy Soller
073d6b5908
core/mode: use libc::umask on redox
2021-08-06 13:56:20 -06:00
Jeremy Soller
1cf95c06ea
core: do not build utmpx feature on redox
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
32d281bbcc
Merge pull request #2544 from miDeb/sort/delete-tmps
...
sort: delete temporary files when sort is terminated
2021-08-06 11:52:06 +02:00
Michael Debertol
0ae9e10ed3
sort: delete the temporary directory when sort is terminated
...
When hitting Ctrl+C sort now deletes any temporary files. To make this easier I
created a new struct `TmpDirWrapper` that handles the creation of new temporary
files and the registration of the signal handler.
2021-08-06 11:29:24 +02:00
Sylvestre Ledru
50b9d9f9a3
Merge branch 'master' into master
2021-08-06 09:26:39 +02:00
Sylvestre Ledru
76222d52ca
Merge pull request #2547 from miDeb/basenc
...
basenc: add utility
2021-08-06 08:48:49 +02:00
Sylvestre Ledru
a76be9cb1e
Merge pull request #2548 from miDeb/chown/test
...
chown: fix unit test
2021-08-06 08:43:07 +02:00
Koutheir Attouchi
090be5bb94
chcon: added implementation and integration tests
...
The ToDo list was updated to mark `chcon` as done.
Building and testing `chcon` requires enabling the `feat_selinux` feature. If `make` is used for building, then please specify `SELINUX_ENABLED=1` if building and testing on a system where SELinux is not enabled.
2021-08-05 22:57:57 -04:00
Michael Debertol
b8c383e210
basenc: add utility
...
basenc is a brand-new gnu core utility (added less than 3 years ago!),
which enables some more encodings.
2021-08-06 00:07:19 +02:00
Michael Debertol
ac6356087e
chown: fix unit test
2021-08-06 00:03:04 +02:00
Sylvestre Ledru
63fd139b04
Merge pull request #2524 from FelipeLema/uresult-cat-2464
...
migrate `cat` code to UResult #2464
2021-08-06 00:02:17 +02:00
backwaterred
2c41838166
Merge branch 'uutils:master' into master
2021-08-04 12:47:47 -07:00
Tyler
0864234e3d
Removes unused macros from windows & macos builds
2021-08-04 12:47:03 -07:00
Tyler
601c9fc620
Merge branch 'master' of https://github.com/uutils/coreutils into uutils-master-2
2021-08-03 17:33:43 -07:00
Tyler
7ed7c840bd
Fix clippy warnings and build issues. Defer NL to seperate issue.
2021-08-03 17:18:34 -07:00
Tyler
e1fcc85b0a
Merge branch 'master' of github.com:backwaterred/coreutils
2021-08-03 16:39:17 -07:00
Michael Debertol
9700f0503d
base32/64: adjust error message to match gnu
2021-08-04 00:04:25 +02:00
Michael Debertol
44ae927969
base32/64: print the first extra operand, not the one before
...
Only one operand is allowed, so when there are multiple arguments we
should print the second argument in the error.
2021-08-03 23:37:20 +02:00
Sylvestre Ledru
26cc2ed440
Merge pull request #2517 from jfinkels/tac-null-separator
...
tac: support null separator (-s "")
2021-08-03 09:22:50 +02:00
Jan Scheer
8232c1c64d
id: increase MSRV in order to compile selinux crate
...
* Bump MSRV from 1.43 to 1.47 in order to be able to compile
`selinux` crate 0.1.3
* Bump MSRV for clippy to 1.47
* Add "selinuxlib" to spell-checker
2021-08-02 20:36:06 +02:00
Jan Scheer
010565c8fb
Merge branch 'master' into id_selinux_context
2021-08-02 10:40:45 +02:00
Sylvestre Ledru
950076fd23
Merge pull request #2543 from miDeb/sort/uresult
...
sort: use UResult
2021-08-02 08:26:43 +02:00
Felipe Lema
5646c81332
correct clippy issues, RustFmt
2021-08-01 23:55:30 -04:00
Jeffrey Finkelstein
d74fb62df7
tac: support null separator
2021-08-01 19:47:21 -04: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
Michael Debertol
a4709c805c
sort: use UResult
2021-08-01 23:22:29 +02:00
Thomas Queiroz
940559f0e1
tail: handle -
as an alias for stdin
2021-08-01 17:20:24 -04:00
Michael Debertol
e8eb15f05e
core/error: require UCustomError to be Send
...
For multi-threaded programs like sort it is necessary to be able to send
errors between threads.
2021-08-01 21:27:59 +02:00
James Robson
0e04f959c2
Add Physical mode to realpath
...
This adds the 'Physical Mode' and 'Logical Mode' switches to realpath, which control when symlinks are resolved.
2021-08-01 17:06:09 +01:00
Michael Debertol
af47c66a00
sort: improve tests
2021-08-01 17:12:35 +02:00
Michael Debertol
3d23ace9b8
sort: remove redundant comment
2021-08-01 17:12:06 +02:00
Sylvestre Ledru
2d84c68f20
Merge branch 'master' into sort/input-is-output
2021-08-01 13:51:19 +02:00
Sylvestre Ledru
11d03bffd3
Merge pull request #2539 from miDeb/sort/args-exit-code
...
sort: do not exit with failure for "--version" or "--help"
2021-08-01 13:50:48 +02:00
Jeffrey Finkelstein
0d348f05f2
basename: handle paths comprising only slashes
...
Fix an issue where `basename` would print the empty path when provided
an input comprising only slashes (for example, "/" or "//" or
"///"). Now it correctly prints the path "/".
2021-07-31 18:57:02 -04:00
Yagiz Degirmenci
95a890e5f8
chore(ln): fix clippy errors
...
Signed-off-by: Yagiz Degirmenci <yagizcanilbey1903@gmail.com>
2021-08-01 01:42:12 +03:00
Yagiz Degirmenci
65dd6afa13
chore(ln): delete comment
...
Signed-off-by: Yagiz Degirmenci <yagizcanilbey1903@gmail.com>
2021-08-01 01:27:25 +03:00
Yagiz Degirmenci
55d1dc78b0
feat(ln): use UResult
...
Signed-off-by: Yagiz Degirmenci <yagizcanilbey1903@gmail.com>
2021-08-01 01:25:21 +03:00
Michael Debertol
663c9751a1
sort: do not exit with failure for "--version" or "--help"
2021-08-01 00:05:08 +02:00
Michael Debertol
418f5b7692
sort: handle empty merge inputs
2021-07-31 21:02:20 +02:00
Michael Debertol
5bf4536bdd
sort: ignore failure to truncate the output file
2021-07-31 21:02:20 +02:00
Michael Debertol
f29239beec
sort: buffer writes to the output
...
This fixes a regression from a33b6d87b5
2021-07-31 21:02:20 +02:00
Michael Debertol
849086e9c5
sort: handle cases where the output file is also an input file
...
In such cases we have to create a temporary copy of the input file to prevent
overwriting the input with the output. This only affects merge sort, because it
is the only mode where we start writing to the output before having read all inputs.
2021-07-31 21:02:18 +02:00
Sylvestre Ledru
103a9d52ff
Merge pull request #2521 from miDeb/sort/rand
...
sort: improve compatibility of --random-sort
2021-07-31 21:00:18 +02:00
Michael Debertol
3564dc5792
sort: compare strings before comparing hashes
...
Since lines that compare equal should be sorted together, we need to first
compare the lines (taking settings into account). Only if they do not compare
equal we should compare the hashes.
2021-07-31 20:07:05 +02:00
Michael Debertol
f851fb6454
sort: initialize the salt when the random setting is on a key as well
...
Additionall, change the type of `salt` from `String` to `Option<[u8; 16]>`.
2021-07-31 20:07:05 +02:00
Michael Debertol
095e53aed2
sort: disallow equal lines for --check with --unique
2021-07-31 19:57:41 +02:00
Andreas Hartmann
ce037bdf55
install: remove obsolete function call
...
The `copy_file_to_file` function was only a wrapper to a `copy` function with
the exact same interface. It has now beed removed for clarity.
2021-07-31 13:06:37 +02:00
Andreas Hartmann
4f235e9e95
install: Use uio_error
to construct errors from std::io::Error
...
Use new macro to construct UIoError types from `std::io::Error` before
printing. This gives consistent error messages across all utilities as it
prepends custom errors to the error description for the respective application
and error type. This saves the developers from manually appending the
`std::io::Error`-specific error messages.
2021-07-31 13:06:37 +02:00
Andreas Hartmann
8066ea87cc
error: Implement uio_error
-macro
...
Adds a new macro `uio_error` that acts as a convenience wrapper for
constructing `UIoError` instances from `std::io::Error`s with a custom error
message prepended. It constructs a new `UIoError` instance for the user.
Usage examples are included in the docs.
2021-07-31 13:06:37 +02:00
Andreas Hartmann
0461a45c9a
install: Use show! macro for noncritical errors during execution
...
Drop the previous flags that would tell whether a noncritical error occured
during execution in favor of the `show!` macro from the error submodule.
This allows us to generate regular error types during execution to signify
failures inside the program, but without prematurely aborting program execution
if not needed or specified.
Also make verbose outputs use `print!` and friends instead of `show_error!` to
ensure verbose output is redirected to stdout, not stderr.
2021-07-31 13:06:37 +02:00
Andreas Hartmann
2b18e45ece
install: Use UResult
...
Related to uutils#2464
2021-07-31 13:06:37 +02:00
Sylvestre Ledru
1eb3b62c46
Merge pull request #2537 from jfinkels/expand-improve-tabs-argument-2
...
expand: expand support for --tabs arguments
2021-07-31 10:33:08 +02:00
Sylvestre Ledru
e780fba2e5
fix a clippy warning
2021-07-31 10:27:51 +02:00
Sylvestre Ledru
638b31a877
Merge pull request #2520 from miDeb/sort/fixes
...
sort: fix some exit codes and error messages
2021-07-31 10:11:12 +02:00
Sylvestre Ledru
8620220298
Merge pull request #2511 from dezgeg/stat-t
...
stat: Support \t in --printf format
2021-07-31 09:52:42 +02:00
Sylvestre Ledru
82a02bf2eb
Merge pull request #2512 from syukronrm/df-uresult
...
df: add `UResult`
2021-07-31 09:52:22 +02:00