Commit graph

8255 commits

Author SHA1 Message Date
Sylvestre Ledru
6f6784f113 Adjust the code after https://github.com/uutils/coreutils/pull/3832 2022-08-18 11:33:04 +02:00
Terts Diepraam
85e6f8659f stty: fix bsd/mac builds 2022-08-18 11:33:04 +02:00
Terts Diepraam
420c69aa98 stty: make compatible with Rust pre 1.61 2022-08-18 11:33:04 +02:00
Terts Diepraam
f861fc0854 stty: print special terminal information 2022-08-18 11:33:04 +02:00
Terts Diepraam
cc147a7c8d stty: expand --help information 2022-08-18 11:33:04 +02:00
Terts Diepraam
679fd2371e stty: disallow combining settings with --all and --save 2022-08-18 11:33:04 +02:00
Terts Diepraam
eac88022b2 stty: fix setting grouped flags 2022-08-18 11:33:04 +02:00
Terts Diepraam
96ea772016 stty: fix clippy warnings 2022-08-18 11:33:04 +02:00
Terts Diepraam
0c44fc07d2 stty: fix ixany and iutf8 not sane 2022-08-18 11:33:04 +02:00
Terts Diepraam
6896a85b41 test_stty: fix spell checker errors 2022-08-18 11:33:04 +02:00
Terts Diepraam
4cda8f33e7 stty: add grouped flags 2022-08-18 11:33:04 +02:00
Terts Diepraam
a23702caeb add some simple tests to stty (still failing) 2022-08-18 11:33:04 +02:00
Terts Diepraam
600cab0bd8 starting work on stty 2022-08-18 11:33:04 +02:00
Sylvestre Ledru
87e3899477
Merge pull request #3832 from tertsdiepraam/simplify-encoding-handling
Simplify invalid encoding handling
2022-08-17 18:59:59 +02:00
Terts Diepraam
383291f5b4
Merge pull request #3829 from niyaznigmatullin/cargo-lock-update
cargo +1.56.1 update
2022-08-17 15:58:48 +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
Terts Diepraam
0ed8b97a3f uucore: remove panic encoding handling
We never want utilities to panic on invalid input and it is not currently in use, so it can be removed safely.
2022-08-17 14:29:53 +02:00
Niyaz Nigmatullin
ec23d02b19 update unicode-ident to 1.0.3, allow Unicode-DFS-2016 License 2022-08-17 13:13:27 +03:00
Niyaz Nigmatullin
dc12639995 Fix completion with a clap update 2022-08-17 13:13:27 +03:00
Niyaz Nigmatullin
52d767ed5a test_pr: follow clippy advice 2022-08-17 13:13:27 +03:00
Niyaz Nigmatullin
33ba5cbc93 downgrade unicode-ident to 1.0.0 2022-08-17 13:13:27 +03:00
Niyaz Nigmatullin
9cd898b885 remove nix 0.24.2 dependency 2022-08-17 13:13:27 +03:00
Niyaz Nigmatullin
f4df7ea4a0 cargo +1.56.1 update 2022-08-17 13:13:27 +03:00
Przemysław Fuchs
3acbd1c048
dd: Error message of invalid args is matched with GNU (#3831) 2022-08-17 11:40:42 +02:00
Owen Anderson
9fad6fde35
Fix a bug in split where chunking would be skipped when the chunk size (#3800)
* Fix a bug in split where chunking would be skipped when the chunk size
happened to be an exact divisor of the buffer size used to read the
input stream.

The issue here was that file was being split byte-wise in chunks of 1G.
The input stream was being read in chunks of 8KB, which evenly divides
the chunk size. Because the check to allocate the next output chunk was
done at the bottom of the loop previously, it would never occur because
the current input chunk was fully consumed at that point. By moving the
check to the top of the loop (but still late enough that we know we have
bytes to write) we resolve this issue.

This scenario is unfortunately hard to write a test for, since we don't
explicitly control the input chunk size.

Fixes https://github.com/uutils/coreutils/issues/3790
2022-08-16 11:02:52 +02:00
Terts Diepraam
5ecabb8467
Merge pull request #3784 from jarkonik/main
Use `clap::ArgAction` in `true` and `false`
2022-08-16 10:50:32 +02:00
Sylvestre Ledru
c03b3c4a18
Merge pull request #3826 from niyaznigmatullin/canonicalize_trailing_slash
readlink: GNU compatibility
2022-08-16 09:24:19 +02:00
Niyaz Nigmatullin
0db17196ca readlink: follow clippy advice, add semicolon 2022-08-16 08:30:47 +03:00
Niyaz Nigmatullin
9c97b700ec readlink: reformat using rustfmt 2022-08-16 08:25:02 +03:00
Niyaz Nigmatullin
5d4ad4de13 tests/readlink: add test for delimiters usage 2022-08-16 08:21:43 +03:00
Niyaz Nigmatullin
391143fe5b readlink: fix -n and -z no delimiter at the end 2022-08-16 08:21:12 +03:00
Niyaz Nigmatullin
6879ed7b34 tests/readlink: refactor added tests 2022-08-15 23:33:41 +03:00
Niyaz Nigmatullin
38add34d31 tests/readlink: fix for Windows 2022-08-15 23:31:45 +03:00
Niyaz Nigmatullin
a5e0a14415 tests/readlink: fix Windows "Not a directory" error message 2022-08-15 23:04:51 +03:00
Niyaz Nigmatullin
b74e2f9d9b tests/readlink: follow clippy advice 2022-08-15 22:48:35 +03:00
Niyaz Nigmatullin
e826ab5f0f tests/readlink: follow clippy advice 2022-08-15 22:47:03 +03:00
Niyaz Nigmatullin
df403334c0 tests/readlink: add spell-checker ignore 2022-08-15 22:47:03 +03:00
Niyaz Nigmatullin
94860f8af6 tests/realpath: add trailing slash usage tests 2022-08-15 22:47:03 +03:00
Niyaz Nigmatullin
1c6f71e0e1 tests/readlink: add tests for trailing slashes and canonicalize -e and
-f usages
2022-08-15 22:47:03 +03:00
Niyaz Nigmatullin
5af152be2c uucore/fs: add Not a directory cases handling, e.g. for trailing slashes 2022-08-15 22:47:03 +03:00
Sylvestre Ledru
0ce135bd97
Merge pull request #3820 from uutils/dependabot/cargo/memmap2-0.5.6
build(deps): bump memmap2 from 0.5.5 to 0.5.6
2022-08-15 21:44:46 +02:00
Sylvestre Ledru
68aec6685e
Merge pull request #3823 from niyaznigmatullin/update-notify-5.0.0-pre.16
Update notify 5.0.0 pre.16
2022-08-15 21:44:09 +02:00
Jaroslaw Konik
710e2af5fd Check argc instead of settings exclusive flag 2022-08-15 19:50:30 +02:00
Jaroslaw Konik
025a0dfa9e Use clap::ArgAction in true and false 2022-08-15 19:48:02 +02:00
Niyaz Nigmatullin
0e96cfa14b tail: fix notify usage for new version 2022-08-15 18:11:46 +03:00
dependabot[bot]
826243bc02
build(deps): bump memmap2 from 0.5.5 to 0.5.6
Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.5.5 to 0.5.6.
- [Release notes](https://github.com/RazrFalcon/memmap2-rs/releases)
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.5...v0.5.6)

---
updated-dependencies:
- dependency-name: memmap2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 11:42:35 +00:00
dependabot[bot]
ade3b7540c
build(deps): bump notify from 5.0.0-pre.15 to 5.0.0-pre.16
Bumps [notify](https://github.com/notify-rs/notify) from 5.0.0-pre.15 to 5.0.0-pre.16.
- [Release notes](https://github.com/notify-rs/notify/releases)
- [Changelog](https://github.com/notify-rs/notify/blob/main/CHANGELOG.md)
- [Commits](https://github.com/notify-rs/notify/compare/5.0.0-pre.15...notify-5.0.0-pre.16)

---
updated-dependencies:
- dependency-name: notify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 11:42:17 +00:00
Sylvestre Ledru
c401b35fdd
dependabot: allow 10 PR 2022-08-15 13:39:37 +02:00
5225225
c7b988c825
uutils: Remove use of mem::uninitialized (#3808) 2022-08-15 10:10:50 +02:00