renovate[bot]
2945d6b6b9
fix(deps): update rust crate wild to 2.1
2023-03-30 06:11:01 +00:00
renovate[bot]
4a89f4ab96
fix(deps): update rust crate data-encoding to 2.3
2023-03-30 05:59:08 +00:00
Sylvestre Ledru
af0a263191
0.0.17 => 0.0.18
2023-03-29 08:11:25 +02:00
Sylvestre Ledru
9d075c65c4
Merge pull request #4653 from uutils/renovate/libc-0.x
...
fix(deps): update rust crate libc to 0.2.140
2023-03-29 07:53:21 +02:00
Daniel Hofstetter
0562c508ed
Merge pull request #4640 from uutils/renovate/glob-0.x
...
fix(deps): update rust crate glob to 0.3.1
2023-03-28 14:48:09 +02:00
Sylvestre Ledru
59b03d2c9e
Merge pull request #4647 from kamilogorek/if-not-else-lint
...
lint: Enable clippy::if_not_else and fix all lint issues
2023-03-28 13:25:31 +02:00
renovate[bot]
915c183ff8
fix(deps): update rust crate libc to 0.2.140
2023-03-28 06:02:04 +00:00
Sylvestre Ledru
ab859b8b58
Merge pull request #4652 from uutils/renovate/itertools-0.x
...
fix(deps): update rust crate itertools to 0.10.5
2023-03-28 07:58:06 +02:00
renovate[bot]
f223629382
fix(deps): update rust crate itertools to 0.10.5
2023-03-27 19:24:30 +00:00
renovate[bot]
bf228385e8
fix(deps): update rust crate glob to 0.3.1
2023-03-27 05:36:00 +00:00
renovate[bot]
515bd8f642
fix(deps): update rust crate dns-lookup to 1.0.8
2023-03-27 05:32:38 +00:00
Kamil Ogórek
68e90eacbb
lint: Fix all issues in preparation for enabling clippy::if_not_else
2023-03-26 22:23:50 +02:00
Tom D
e4408f3759
Refactor signal handling in yes, tee, and timeout
...
Yes, using libc while using nix was a bit redundant.
Upon investigation, duplicated code was found and moved to uucore.
2023-03-26 11:10:40 +02:00
Sylvestre Ledru
8e1082458f
Merge pull request #4393 from cakebaker/uucore_indent_usage_info
...
uucore: indent multiline usage info
2023-03-24 23:13:11 +01:00
SSJDeathSpawn
4f88356035
refactor: simplification and name change
2023-03-21 18:52:54 +05:30
SSJDeathSpawn
6699eaad6c
Added condition to ensure name of utility appears
2023-03-21 18:19:17 +05:30
Benjamin Bara
e982d57819
chmod: fix GNU test 'chmod/usage'
2023-03-16 21:25:26 +01:00
Terts Diepraam
320929d83d
Merge branch 'main' into issue-4176-fix-timeout
2023-03-12 13:35:27 +01:00
papparapa
e5b6f63305
parser: fix index out of bounds error ( #4484 )
...
+ revert 1bc9980
to use files in workspace
2023-03-12 11:07:59 +01:00
Miles Liu
f406b56f4a
timeout: fix subprocess is never terminated
2023-03-10 18:08:54 +08:00
Daniel Hofstetter
b35c415578
uucore: indent multiline usage info
2023-03-05 21:38:21 +01:00
Terts Diepraam
3554565c82
Merge pull request #4356 from howjmay/cksum-a
...
cksum: implement -a
2023-02-23 12:18:21 +01:00
Sylvestre Ledru
7da22b3ae2
Merge pull request #4405 from bbara/utmpx-time
...
utmpx: arch/os-independent timeval handling
2023-02-22 21:26:10 +01:00
Benjamin Bara
dd216ee23e
utmpx: cast timeval fields to i64
2023-02-22 18:50:08 +01:00
Yang Hau
9322580967
Add checksum algorithm abstractions
2023-02-21 21:14:58 +08:00
Yang Hau
2cd19522e4
fix: Fix panic in multi-byte characters
...
Closes #4353
2023-02-19 10:15:53 +08:00
Yang Hau
678a11dcf2
cksum: Implement option -a
...
Implement option -a --algorithm.
Move digest to src/uucore/src/lib/features and rename it to hash.
fix lint
fix Cargo.toml
2023-02-18 20:58:53 +08:00
Terts Diepraam
ae27c82020
Use workspace inheritance for dependencies
2023-02-11 18:54:46 +01:00
Terts Diepraam
d60fc40f2f
Clippy fixes for MSRV 1.64
2023-02-11 13:59:50 +01:00
Terts Diepraam
357001dabc
fix double dependency of memoffset by upgrading nix, libc and ctrlc
2023-02-09 14:02:40 +01:00
Daniel Hofstetter
f6b646e4e5
clippy: fix warnings introduced with Rust 1.67.0
2023-01-27 17:37:56 +01:00
Joining7943
9796e70a28
uucore: Fix #4298 : Build on s390x and riscv64 architectures fails
2023-01-23 21:13:59 +01:00
Terts Diepraam
4d3dc78686
Version 0.0.17
2023-01-21 10:38:18 +01:00
Daniel Hofstetter
f50c352adc
clippy: use type name instead of Default::default
2023-01-16 10:52:28 +01:00
trasua
ef8f92f720
uucore: add options to parse_size::Parser to support parse_byte_count() in sort.rs
2022-12-26 10:23:20 +01:00
Daniel Hofstetter
a0522f5cbd
clippy: fix some "unnested or-patterns" warnings
2022-12-20 16:07:37 +01:00
Joining7943
c94a039358
clippy and doc: Fix warnings, mostly needless conversions. Fix documentation warning.
2022-12-16 18:36:27 +01:00
Daniel Hofstetter
81243db948
chore: fix wildcards that match single variant
2022-12-06 10:50:34 +01:00
Sylvestre Ledru
3880b463fe
Merge pull request #4185 from jfinkels/uucore-sprintf-2
...
uucore: add sprintf() function
2022-12-03 10:21:09 +01:00
Terts Diepraam
dc828fed2d
uucore/process: remove custom ExitStatus
2022-12-02 12:25:14 +01:00
Jeffrey Finkelstein
d083fa19c2
uucore: add sprintf() function
...
Add an `sprintf()` function (and `printf()` function) to
`uucore::memo`. The `sprintf()` function behaves roughly like the
standard Rust `format!()`, but follows our implementation of the GNU
`printf` formatting logic instead.
2022-12-02 07:48:36 +01:00
Daniel Hofstetter
9a2174ba02
chore: standardize creation of empty strings
2022-12-01 13:49:23 +01:00
Terts Diepraam
1b35e467ac
Merge pull request #4137 from jfinkels/dd-bytes-suffix
...
dd: allow B as a suffix for count, seek, and skip
2022-11-19 12:23:43 +01:00
Sylvestre Ledru
6d7850549b
Merge pull request #4150 from tertsdiepraam/stat-refactor
...
`stat` refactor
2022-11-19 09:57:23 +01:00
Jeffrey Finkelstein
701550d76b
dd: allow B as a suffix for count, seek, and skip
...
Allow uppercase "B" on its own as a unit specifier for the `count`,
`seek`, and `skip` arguments to `dd`.
For example,
$ printf "abcdef" | dd count=3B status=none
abc
2022-11-18 20:27:42 -05:00
Jeffrey Finkelstein
847378f8d2
uucore: create parse_size::Parser struct
...
Add a `uucore::parse_size::Parser` struct which will allow future
commits to add fields that change the behavior of `parse_size()`.
2022-11-18 20:27:34 -05:00
Terts Diepraam
6cdcfca573
uucore: add prompt_yes!() and read_yes()
...
These functions are based on existing functions and macros
in utils `cp`, `ln`, `mv ` and `rm`. This unifies the separate
implementations.
2022-11-17 15:06:49 +01:00
Terts Diepraam
406df12b18
stat: make OutputType carry data, instead of turning everthing immediately into a string
2022-11-16 22:23:03 +01:00
Sylvestre Ledru
6bc68cdcdf
Merge branch 'main' into refactor/add_nix_error_auto_conversion
2022-11-04 12:54:35 +01:00
Daniel Hofstetter
96ef306cb3
Fix "unwrap or else default" clippy warning
2022-11-04 10:07:21 +01:00
Daniel Hofstetter
2d4810b91b
numfmt: allow ' ' as field separator
2022-11-01 10:04:46 +01:00
Sylvestre Ledru
f2f2f7033e
Merge branch 'main' into refactor/add_nix_error_auto_conversion
2022-10-30 15:54:13 +01:00
dependabot[bot]
69c1f28c66
build(deps): bump libc from 0.2.136 to 0.2.137
...
Bumps [libc](https://github.com/rust-lang/libc ) from 0.2.136 to 0.2.137.
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.136...0.2.137 )
---
updated-dependencies:
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-26 06:42:06 +00:00
dependabot[bot]
2213ad5d1c
build(deps): bump libc from 0.2.135 to 0.2.136
...
Bumps [libc](https://github.com/rust-lang/libc ) from 0.2.135 to 0.2.136.
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.135...0.2.136 )
---
updated-dependencies:
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-25 23:28:47 +02:00
Orhun Parmaksız
f117f36313
Merge branch 'main' into refactor/add_nix_error_auto_conversion
2022-10-22 20:35:43 +02:00
Orhun Parmaksız
81ea9521ce
fix: conditionally enable nix
error conversions
2022-10-22 21:34:45 +03:00
Orhun Parmaksız
c19c19e4db
docs: add usage example for nix::Errno
conversion
2022-10-22 21:26:33 +03:00
Orhun Parmaksız
990bb4224d
test: add test for nix::Error
conversions
2022-10-22 17:45:40 +03:00
Orhun Parmaksız
df8ba87516
feat: add more implementations for converting nix::Error
2022-10-22 17:20:57 +03:00
Sylvestre Ledru
e4fe2b10fa
Merge pull request #4014 from tertsdiepraam/ls-windows-permissions
...
`ls`, `stat`: Show more info in long format on Windows
2022-10-22 10:21:43 +02:00
Sylvestre Ledru
74624b27f1
Merge branch 'main' into refactor/add_nix_error_auto_conversion
2022-10-22 10:19:09 +02:00
Niyaz Nigmatullin
76ee0db26c
uucore: migrate from winapi
to windows-sys
crate
2022-10-20 12:16:22 +03:00
Orhun Parmaksız
50be73d99f
refactor: add automatic conversion for nix::Errno
2022-10-19 00:13:59 +03:00
Terts Diepraam
d6753d8914
uucore: remove string leak in format_usage
2022-10-13 17:55:02 +02:00
Terts Diepraam
042bb3c4e3
cp: update to clap 4
2022-10-13 17:50:26 +02:00
Terts Diepraam
9605c7f135
uucore: update to clap 4
2022-10-13 17:50:17 +02:00
Sylvestre Ledru
6e14dea73b
Fix some clippy warnings
...
Fixed with `cargo clippy --features unix --fix`
and manually
2022-10-13 09:07:22 +02:00
dependabot[bot]
68f2b44c88
build(deps): bump dunce from 1.0.2 to 1.0.3
...
Bumps [dunce](https://gitlab.com/kornelski/dunce ) from 1.0.2 to 1.0.3.
- [Release notes](https://gitlab.com/kornelski/dunce/tags )
- [Commits](https://gitlab.com/kornelski/dunce/commits/v1.0.3 )
---
updated-dependencies:
- dependency-name: dunce
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-12 16:54:02 +00:00
Terts Diepraam
f15c4f2d3e
Version 0.0.16
2022-10-11 23:03:39 +02:00
Terts Diepraam
86738ce6cf
ls,stat: Show more info in long format
2022-10-09 00:27:32 +02:00
Daniel Hofstetter
9e8daf92dd
Replace deprecated value_of() with get_one()
2022-09-26 16:42:42 +02:00
Niyaz Nigmatullin
90babe2775
uucore: remove is_symlink
function
...
Since Rust 1.58 there is `is_symlink` method for `Path`
2022-09-23 20:32:09 +03:00
Terts Diepraam
975a1d170d
change remaining usage codes of 2 to 1 for GNU compat
2022-09-10 20:24:24 +02:00
Jeffrey Finkelstein
8458bf1387
Clippy fixes in multiple crates
2022-08-23 18:30:43 -04:00
Terts Diepraam
15180249fc
Version 0.0.15
2022-08-20 13:13:22 +02:00
dependabot[bot]
6193cdbba8
build(deps): bump libc from 0.2.131 to 0.2.132
...
Bumps [libc](https://github.com/rust-lang/libc ) from 0.2.131 to 0.2.132.
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.131...0.2.132 )
---
updated-dependencies:
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-08-19 12:22:35 +00:00
Sylvestre Ledru
b7ea400861
Merge pull request #3837 from tertsdiepraam/remove-more-error-macros
...
`uucore` & `cp`: remove `show_error_custom_description` macros `show_usage_error`
2022-08-19 10:01:49 +02:00
Sylvestre Ledru
fb4ddd5310
Merge pull request #3844 from tertsdiepraam/ranges-refactor
...
`uucore::ranges`: Refactor, document and test
2022-08-19 09:02:35 +02:00
Terts Diepraam
003b483705
uucore/ranges: refactor and test complement
2022-08-18 21:27:32 +02:00
Terts Diepraam
7890228f82
uucore/ranges: document and test merge operation
2022-08-18 19:45:56 +02:00
Terts Diepraam
e9e9a8166f
uucore/ranges: refactor FromStr impl
2022-08-18 19:45:18 +02:00
Sylvestre Ledru
88261f36dd
Merge pull request #3834 from uutils/dependabot/cargo/once_cell-1.13.1
...
build(deps): bump once_cell from 1.13.0 to 1.13.1
2022-08-18 13:35:59 +02:00
Terts Diepraam
b983355bc4
uucore & cp: remove show_error_custom_description
macros show_usage_error
2022-08-18 10:44:59 +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
dependabot[bot]
e465d0520f
build(deps): bump once_cell from 1.13.0 to 1.13.1
...
Bumps [once_cell](https://github.com/matklad/once_cell ) from 1.13.0 to 1.13.1.
- [Release notes](https://github.com/matklad/once_cell/releases )
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md )
- [Commits](https://github.com/matklad/once_cell/compare/v1.13.0...v1.13.1 )
---
updated-dependencies:
- dependency-name: once_cell
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-08-17 16:20:25 +00: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
9cd898b885
remove nix 0.24.2 dependency
2022-08-17 13:13:27 +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
David Carlier
b5bb070777
while at it, let's do OpenBSD.
2022-08-13 10:21:30 +01:00
David Carlier
36561c9526
uucore fix NetBSD build.
2022-08-13 08:24:45 +01:00
Daniel Hofstetter
fcb7185279
Disable "broken intra doc links" lint
2022-08-12 14:48:59 +02:00
Daniel Hofstetter
c0c26c4c58
Replace deprecated values_of() with get_many()
2022-08-11 13:49:09 +02:00
Ackerley Tng
defde8c91e
uucore: add parse_glob module
2022-08-09 10:36:23 +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
Sylvestre Ledru
62305e67d1
Merge pull request #3719 from andrewbaptist/main
...
split: Don't overwrite files
2022-07-23 22:54:57 +02:00
Sylvestre Ledru
f82ada645e
Merge pull request #3731 from sylvestre/fs-doc
...
document some common fs functions
2022-07-22 13:29:15 +02:00
Andrew Baptist
f2cfc15a70
split: Don't overwrite files
...
Check that a file exists by calling create_new and changing the
interface of instantiate_current_writer to return a Result rather
than calling unwrap.
2022-07-21 12:06:13 -04:00
Sylvestre Ledru
ba44fd0e2b
document some common fs functions
2022-07-20 17:51:53 +02:00
Niyaz Nigmatullin
9f2a9fa6ff
uucore/fs: make function more generic
2022-07-19 17:34:52 +03:00
Niyaz Nigmatullin
80ff3b3b40
ln: change error messages, extract common code
2022-07-19 17:34:52 +03:00
Andrew Baptist
cc08e1cc3a
Update to handle all the latest cargo warnings
2022-07-18 13:20:49 -04:00
dependabot[bot]
d15b95533e
build(deps): bump nix from 0.24.1 to 0.24.2
...
Bumps [nix](https://github.com/nix-rust/nix ) from 0.24.1 to 0.24.2.
- [Release notes](https://github.com/nix-rust/nix/releases )
- [Changelog](https://github.com/nix-rust/nix/blob/v0.24.2/CHANGELOG.md )
- [Commits](https://github.com/nix-rust/nix/compare/v0.24.1...v0.24.2 )
---
updated-dependencies:
- dependency-name: nix
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 06:41:18 +00:00
Niyaz Nigmatullin
4db08273b3
ln: error on --force when src=dst and dst is regular file
2022-07-18 08:17:37 +03:00
Sylvestre Ledru
882cd527ff
Merge pull request #3704 from Sciencentistguy/once_cell
...
Replace lazy_static with once_cell
2022-07-13 16:15:47 +02:00
Niyaz Nigmatullin
c829ecfd1d
uucore/fs: get back to loop looking in windows as FileInformation
...
for directory is fixed
2022-07-12 17:15:16 +03:00
Jamie Quigley
1a270361c0
Replace lazy_static with once_cell
2022-07-12 14:08:30 +01:00
Terts Diepraam
6b00aec48e
Merge pull request #3602 from lendandgit/main
...
df: better error message when executed in a chroot without /proc #3601
2022-07-11 23:02:39 +02:00
Niyaz Nigmatullin
da5808d4ac
ls: add already listed message ( #3707 )
...
* ls: handle looping symlinks infinite printing
* ls: better coloring and printing symlinks when dereferenced
* tests/ls: add dereferencing and symlink loop tests
* ls: reformat changed using rustfmt
* ls: follow clippy advice for cleaner code
* uucore/fs: fix FileInformation to open directory handles in Windows as
well
2022-07-11 17:18:58 +02:00
Niyaz Nigmatullin
9d285e953d
Realpath symlinks handling, solves issue #3669 ( #3703 )
2022-07-10 16:49:25 +02:00
leon
9d554751ca
df: better error message when executed in a chroot without /proc #3601
2022-07-07 15:24:00 +02:00
Sylvestre Ledru
38f5a47f76
Merge pull request #3698 from uutils/dependabot/cargo/once_cell-1.13.0
...
build(deps): bump once_cell from 1.12.0 to 1.13.0
2022-07-06 08:56:12 +02:00
dependabot[bot]
6a335236c1
build(deps): bump once_cell from 1.12.0 to 1.13.0
...
Bumps [once_cell](https://github.com/matklad/once_cell ) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/matklad/once_cell/releases )
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md )
- [Commits](https://github.com/matklad/once_cell/compare/v1.12.0...v1.13.0 )
---
updated-dependencies:
- dependency-name: once_cell
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-05 06:51:26 +00:00
Sylvestre Ledru
7ca2ae4627
spell: Ignore backport
2022-07-05 08:31:45 +02:00
Jeffrey Finkelstein
df83d59b2d
uucore: add backport for Path::is_symlink()
...
Add a `uucore::fs::is_symlink()` function that takes in a
`std::path::Path` and decides whether the given path is a symbolic
link. This is essentially a backport of the `Path::is_symlink()`
function that appears in Rust version 1.58.0. This commit also
replaces some now-duplicate code in `chmod`, `cp`, `ln`, and `rmdir`
that checks whether a path is a symbolic link with a call to
`is_symlink()`.
Technically, this commit slightly changes the behavior of
`cp`. Previously, there was a line of code like this
if fs::symlink_metadata(&source)?.file_type().is_symlink() {
where the `?` operator propagates an error from `symlink_metadata()`
to the caller. Now the line of code is
if is_symlink(source) {
in which any error from `symlink_metadata()` has been converted to
just be a `false` value. I believe this is a satisfactory tradeoff to
make, since an error in accessing the file will likely cause an error
later in the same code path.
2022-07-04 17:25:52 -04:00
Gergely Kalas
4f043ff57f
Fix 'wc' gnu test-suite compatibility #3678
...
This change will extract a utility already present in ls to uucore.
This utility is used by dir and vdir too, which are adjusted to
look it up in uucode. No further changes to ls, dir or dirv intended.
The change here largely fiddles with the output of uu_wc to match
that of GNU wc. This is the case to the extent to make unit tests
pass, however, there are differences remaining. One specific
difference I did not tackle is that GNU wc will not align the
output columns (compute_number_width() -> 1) in the specific case
of the input for --files0-from=- being a named pipe, not real stdin.
This difference can be triggered using the following two invocations.
- wc --files0-from=- < files0 # use a named pipe, GNU does align
- cat files0- | wc --files0-from=- # use real stdin, GNU does not
align.
2022-07-01 16:43:09 +02:00
Daniel Hofstetter
72aa2ff0ab
uucore: fix invalid enum variant in docstring
2022-06-16 14:43:01 +02:00
dependabot[bot]
5a42c06b25
build(deps): bump once_cell from 1.11.0 to 1.12.0
...
Bumps [once_cell](https://github.com/matklad/once_cell ) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/matklad/once_cell/releases )
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md )
- [Commits](https://github.com/matklad/once_cell/compare/v1.11.0...v1.12.0 )
---
updated-dependencies:
- dependency-name: once_cell
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 19:18:28 +00:00
Terts Diepraam
eae07adfb1
Version 0.0.14 ( #3553 )
...
Version 0.0.14
2022-05-22 19:57:19 +02:00
Daniel Hofstetter
27dd59635a
uucore: add InvalidSuffix to ParseSizeError
2022-05-17 15:37:49 +02:00
Sylvestre Ledru
7792af336e
Merge pull request #3535 from uutils/dependabot/cargo/libc-0.2.126
...
build(deps): bump libc from 0.2.125 to 0.2.126
2022-05-17 12:32:22 +02:00
Terts Diepraam
eac0760905
Merge pull request #3528 from jfinkels/clippy-fixes
...
all: clippy fixes
2022-05-17 11:57:47 +02:00
dependabot[bot]
cd743c2fd1
build(deps): bump libc from 0.2.125 to 0.2.126
...
Bumps [libc](https://github.com/rust-lang/libc ) from 0.2.125 to 0.2.126.
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.125...0.2.126 )
---
updated-dependencies:
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-17 07:13:42 +00:00
Sylvestre Ledru
40095e1b50
Merge pull request #3438 from jfinkels/chown-nonexistent-user-id
...
chown: allow setting arbitrary numeric user ID
2022-05-14 09:20:01 +02:00
Jeffrey Finkelstein
896bbec760
all: clippy fixes
2022-05-13 22:47:56 -04:00
Terts Diepraam
0acfa07d77
all: add value hints
2022-05-13 16:15:50 +02:00
Jeffrey Finkelstein
5713de4d93
fixup! uucore(perms): better support nameless uids, gids
2022-05-12 08:41:17 +02:00
Jeffrey Finkelstein
08b6dd4975
uucore(perms): better support nameless uids, gids
...
Update the `wrap_chown()` function to support user IDs and group IDs
that do not correspond to named users or groups, respectively. Before
this commit, the result from `uid2usr()` and `gid2grp()` calls were
unwrapped because we assumed a user name or group name, respectively,
existed. However, this is not always true: for example, running the
command `sudo chown 12345 f` works even if there is no named user with
ID 12345. This commit expands `wrap_chown()` to work even if no name
exists for the user or group.
2022-05-12 08:41:17 +02:00
Jan Scheer
d906f09e6e
stat: improve handling of stdin/fifo ( fix #3485 )
...
* fix https://github.com/uutils/coreutils/issues/3485
* improve the workaround from #3280
* add tests
2022-05-11 12:59:25 +02:00
Sylvestre Ledru
56264ebece
Merge branch 'main' into 2884-time-0.3
2022-05-07 20:57:14 +02:00
Terts Diepraam
7b84261df4
uucore/error: add custom exit codes for clap errors
...
This allows us to use clap errors as UResult and specify the exit code for invalid arguments per util.
2022-05-04 21:32:04 +02:00
Sylvestre Ledru
9b69e6fd47
Merge branch 'main' into 2884-time-0.3
2022-05-02 18:14:14 +02:00
Terts Diepraam
0322d4633e
Merge pull request #3061 from hbina/hbina-printf-default-left-justify-legth
...
printf: Default left-justify integer conversion to 1 width
2022-05-02 17:50:10 +02:00
dependabot[bot]
de6aa6de9b
build(deps): bump libc from 0.2.124 to 0.2.125
...
Bumps [libc](https://github.com/rust-lang/libc ) from 0.2.124 to 0.2.125.
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.124...0.2.125 )
---
updated-dependencies:
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 06:36:41 +00:00
Hanif Ariffin
2e60dce11a
printf: Default left-justify integer conversion to 1 width
...
When using left-justify with integer conversion (like `printf '%-o'`),
default the minimum width to 1.
Closes: https://github.com/uutils/coreutils/issues/3050
Signed-off-by: Hanif Ariffin <hanif.ariffin.4326@gmail.com>
2022-05-01 20:00:09 +02:00
Sylvestre Ledru
2b11d77395
time: Improve the l&f
2022-05-01 17:01:13 +02:00
Sylvestre Ledru
10eaaae272
time: take in account the local tz
2022-05-01 17:00:41 +02:00
Sylvestre Ledru
e23dd68715
time: Force the display of the tz sign
2022-05-01 17:00:41 +02:00
Sylvestre Ledru
3a576f2441
time: Various fixes
2022-05-01 17:00:35 +02:00
Sylvestre Ledru
ca670148f2
build(deps): bump time from 0.1.43 to 0.3.9
...
Bumps [time](https://github.com/time-rs/time ) from 0.1.43 to 0.3.9.
- [Release notes](https://github.com/time-rs/time/releases )
- [Changelog](https://github.com/time-rs/time/blob/main/CHANGELOG.md )
- [Commits](https://github.com/time-rs/time/compare/v0.1.43...v0.3.9 )
---
updated-dependencies:
- dependency-name: time
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-01 16:58:47 +02:00
dependabot[bot]
3cee681e82
build(deps): bump libc from 0.2.121 to 0.2.124
...
Bumps [libc](https://github.com/rust-lang/libc ) from 0.2.121 to 0.2.124.
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.121...0.2.124 )
---
updated-dependencies:
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-26 11:23:42 +02:00
Sylvestre Ledru
51c0893564
Merge pull request #3434 from uutils/dependabot/cargo/z85-3.0.5
...
build(deps): bump z85 from 3.0.4 to 3.0.5
2022-04-25 23:07:54 +02:00
dependabot[bot]
8f8aa61e6a
build(deps): bump z85 from 3.0.4 to 3.0.5
...
Bumps [z85](https://github.com/decafbad/z85 ) from 3.0.4 to 3.0.5.
- [Release notes](https://github.com/decafbad/z85/releases )
- [Commits](https://github.com/decafbad/z85/commits )
---
updated-dependencies:
- dependency-name: z85
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 08:13:54 +02:00
Ryan Zoeller
363a2a5611
Upgrade nix to 0.24.1, ctrlc to 3.2.2
...
Limit nix features, which should help compile times slightly.
Replace usage of deprecated nix functionality with std equivalent.
2022-04-25 08:13:20 +02:00
Daniel Hofstetter
88c2b445e5
Add "nix" to Cargo.toml
2022-04-22 17:17:17 +02:00
Justin Tracey
1f025c19af
address libc weirdness on 32 bit android
2022-04-20 08:44:49 +02:00
Justin Tracey
2a0d58d060
get android builds to compile and pass tests
2022-04-20 08:44:49 +02:00
Justin Tracey
5e7d58650d
fix null pointer derefs
...
The code for creating a Passwd from the fields of the raw syscall result
assumed that the syscall would return valid C strings in all non-error
cases. This is not true, and at least one platform (Android) will
populate the fields with null pointers where they are not supported.
To fix this and prevent the error from happening again, this commit
changes `cstr2string(ptr)` to check for a null pointer, and return an
`Option<String>`, with `None` being the null pointer case. While
arguably it should be the caller's job to check for a null pointer
before calling (since the safety precondition is that the pointer is to
a valid C string), relying on the type checker to force remembering this
edge case is safer in the long run.
2022-04-20 08:44:49 +02:00
dependabot[bot]
90b80617b9
build(deps): bump os_display from 0.1.2 to 0.1.3
...
Bumps [os_display](https://github.com/blyxxyz/os_display ) from 0.1.2 to 0.1.3.
- [Release notes](https://github.com/blyxxyz/os_display/releases )
- [Changelog](https://github.com/blyxxyz/os_display/blob/master/CHANGELOG.md )
- [Commits](https://github.com/blyxxyz/os_display/compare/v0.1.2...v0.1.3 )
---
updated-dependencies:
- dependency-name: os_display
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-13 14:54:10 +02:00
Terts Diepraam
af32f7a117
Dont use from_*
method names that take self
...
This was reported as an error in Clippy 1.60.
2022-04-11 22:50:36 +02:00
Terts Diepraam
c6c936f529
all: remove explicit imports of TryFrom and TryInto
...
This is enabled by the changing the edition from 2018 to 2021
2022-04-05 10:39:31 +02:00
Terts Diepraam
af9f718936
Change edition to 2021
2022-04-05 10:39:31 +02:00
Sylvestre Ledru
a219d9e355
Merge pull request #3353 from sylvestre/install
...
install: support of `-d dir/.` to match GNU's
2022-04-03 19:31:48 +02:00
Sylvestre Ledru
c00a277448
mkdir: also use the dir_strip_dot_for_creation function
2022-04-03 16:47:06 +02:00
Sylvestre Ledru
845b2294e1
create a function dir_strip_dot_for_creation to manage the /. issue
2022-04-03 16:47:06 +02:00
Terts Diepraam
4701ea0c95
uucore: use split_once in canon_host
2022-04-02 15:18:34 +02:00
Terts Diepraam
b7809bd889
version 0.0.13
2022-04-02 11:04:27 +02:00
Hanif Ariffin
5c85f5a9d4
Fix incorrect usage of CString because it didn't come from us ( #3279 )
2022-03-30 09:53:09 +02:00
Jeffrey Finkelstein
6a8ce447b7
uucore: no uppercase suffixes in parse_time
...
Disallow uppercase unit suffixes "S", "M", "H", and "D" in
`uucore::parse_time::from_str()` to match the behavior of GNU `sleep`
and `timeout`.
2022-03-26 10:39:00 -04:00
Jeffrey Finkelstein
e357d2650c
clippy fixes from nightly rust
2022-03-22 21:44:33 -04:00
Terts Diepraam
fc1fa8d1f7
Merge pull request #3027 from shoriminimoe/2986-cp
...
cp: only allow directory for -t
2022-03-22 23:08:54 +01:00
Sylvestre Ledru
c19a8feb22
Merge pull request #3291 from devnexen/illumos_build_fix
...
fsext solaris/illumos build fix
2022-03-22 20:07:47 +01:00
Jeffrey Finkelstein
f4af226820
uucore: error on negative interval in parse_time
...
Return an error when a negative interval is provided as the argument
to `uucore::parse_time::from_str()`, since a `Duration` should only be
non-negative.
2022-03-21 21:11:31 -04:00
David Carlier
d8102503bf
fsext solaris/illumos build fix
2022-03-21 23:20:22 +00:00
Sylvestre Ledru
7963287c6c
Merge pull request #3282 from uutils/dependabot/cargo/libc-0.2.121
...
build(deps): bump libc from 0.2.113 to 0.2.121
2022-03-21 17:49:11 +01:00
Sylvestre Ledru
435c983b36
Merge pull request #3087 from water-ghosts/printf-general
...
printf - Update %g formatting to match GNU
2022-03-21 13:23:28 +01:00
dependabot[bot]
34d2d1d05e
build(deps): bump libc from 0.2.113 to 0.2.121
...
Bumps [libc](https://github.com/rust-lang/libc ) from 0.2.113 to 0.2.121.
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.113...0.2.121 )
---
updated-dependencies:
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-20 18:14:52 +00:00
Sam Caldwell
f40fecf86d
Add UError impl for clap::Error
2022-03-20 13:50:39 +01:00
Terts Diepraam
d90a81fb46
all utils: remove short help flag if another -h flag is present
2022-03-20 11:16:20 +01:00
Eli Youngs
a0bd88b51b
Add comments and an additional test
2022-03-20 00:44:09 -07:00
Sylvestre Ledru
3c88fb460b
Merge branch 'main' into dependabot/cargo/clap-3.1.6
2022-03-19 09:26:05 +01:00
Jeffrey Finkelstein
388cb6c83a
uucore: use Duration::saturating_mul in parse_time
...
Use `Duration::saturating_mul()` to avoid a panic due to overflow in
`uucore::parse_time::from_str()`. This change prevents panic on very
large arguments to timeout and sleep.
2022-03-18 23:15:02 -04:00
Terts Diepraam
04de1251dd
Merge branch 'main' into dependabot/cargo/clap-3.1.6
2022-03-18 09:54:04 +01:00
Benjamin Bouvier
ba5b2dc2ed
Remove unused dependencies by individual crates ( #3264 )
2022-03-17 22:48:17 +01:00
Terts Diepraam
20212be4c8
fix clippy errors related to clap upgrade from 3.0.10 to 3.1.6
2022-03-17 22:46:56 +01:00
dependabot[bot]
59440d35c0
build(deps): bump clap from 3.0.10 to 3.1.6
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.0.10 to 3.1.6.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.0.10...v3.1.6 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-17 13:06:29 +00:00
Eli Youngs
2afa9cd1a0
printf - Update %g formatting to match GNU
2022-03-11 23:43:59 +01:00
Sylvestre Ledru
2e860e7048
Merge pull request #3116 from nickd0/printf-round-fix
...
printf: fix printf sci notation round up
2022-03-09 19:47:52 +01:00
Nick Donald
a74ffac19e
printf: fix printf sci notation round up
2022-03-07 07:01:21 +01:00
dependabot[bot]
2e50eade7f
build(deps): bump once_cell from 1.9.0 to 1.10.0
...
Bumps [once_cell](https://github.com/matklad/once_cell ) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/matklad/once_cell/releases )
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md )
- [Commits](https://github.com/matklad/once_cell/compare/v1.9.0...v1.10.0 )
---
updated-dependencies:
- dependency-name: once_cell
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-03-06 22:35:33 +00:00
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
Hanif Ariffin
30a174e6e4
realpath: Error when resolved symlink is absolute and ENOENT ( #3037 )
...
* realpath: Match behavior where resolving symlinks with absolute path is an error if ENOENT
This PR changes `realpath` to match the behavior in GNU where,
```shell
hbina@akarin ~/Documents> mkdir dir1
hbina@akarin ~/Documents> mkdir dir2
hbina@akarin ~/Documents> touch dir2/bar
hbina@akarin ~/Documents> ln -s ../dir2/bar dir1/foo1
hbina@akarin ~/Documents> ln -s /dir2/bar dir1/foo2
hbina@akarin ~/Documents> ln -s ../dir2/baz dir1/foo3
hbina@akarin ~/Documents> realpath ./dir1/foo1 ./dir1/foo2 ./dir1/foo3
/home/hbina/Documents/dir2/bar
realpath: ./dir1/foo2: No such file or directory
/home/hbina/Documents/dir2/baz
```
Currently, our `realpath` will happily print the second one out,
```shell
hbina@akarin ~/Documents> ~/git/uutils/target/debug/coreutils realpath ./dir1/foo1 ./dir1/foo2 ./dir1/foo3
/home/hbina/Documents/dir2/bar
/dir2/bar
/home/hbina/Documents/dir2/baz
```
Closes https://github.com/uutils/coreutils/issues/3036
Signed-off-by: Hanif Ariffin <hanif.ariffin.4326@gmail.com>
2022-03-03 23:06:15 +01:00
Omer Tuchfeld
b6c952c46e
Fix parse_size
to use u64 rather than usize for better 32-bit support
...
Using usize limits 32-bit platforms to operate only on sizes of 4GiB
or less. While 32-bit platforms only have 4GiB of addressable memory,
not all operations require the data to be entirely in memory, so this
limitation can be lifted if we use u64 instead of usize.
This only fixes the core function, further commits fix the utilities
making use of this function.
2022-02-22 11:09:40 +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
ndd7xv
f04f22b012
uucore(memo): refactor error propogation with new SubError enum
2022-02-17 22:43:30 -05:00
ndd7xv
1e12c46c24
uucore(memo): replace err_conv with result
2022-02-17 22:43:30 -05:00
Davide Cavalca
11688408a1
uucore, uucore_procs: use the correct URLs in the crate manifest
2022-02-12 21:31:39 -08: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
Sylvestre Ledru
e76818bb19
Merge pull request #3083 from jfinkels/df-table-module
...
df: refactor data table into Row, Header structs
2022-02-12 11:30:28 +01:00
Eli Youngs
6e0fedc277
Fix panic when canonicalizing a nonexistent path
2022-02-08 20:19:13 -08:00
Jeffrey Finkelstein
44772a8dbb
uucore: set meaningless FsUsage.ffree value to 0
...
Set the value of the `FsUsage.ffree` value to 0 on Windows, because
even though it is meaningless, it should not exceed the
`FsUsage.files` value so that client code can rely on the guarantee
that `FsUsage.ffree <= FsUsage.files`.
2022-02-06 21:54:58 -05:00
Eli Youngs
162f85773e
printf: Support leading zeroes with %0n formatting
2022-02-05 00:43:09 -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
Daniel Eades
4f8d1c5fcf
add additional lints
2022-01-31 20:40:47 +01:00
Terts Diepraam
184b65df20
uucore: allow backup suffix with hyphen value
2022-01-31 12:10:57 +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
41e2197188
squash some repeated match blocks
2022-01-30 18:32:09 +01:00
Sylvestre Ledru
de07df5992
Merge pull request #2963 from danieleades/refactor/code-quality
...
Refactor/code quality
2022-01-30 18:26:16 +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
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
2f6f6867c5
Merge branch 'main' into 2940
2022-01-30 13:33:35 +01:00
Dan Klose
bb7f37e8b4
fix: update itertools 0.8.0 -> 0.10.0
...
Targets https://github.com/uutils/coreutils/issues/2940
* since versions were mxing versions of x.y and x.y.z I changed all to x.y.z
* minor whitespace formatting
2022-01-29 22:35:51 +00: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
Sylvestre Ledru
7f79fef2cd
fix various doc warnings
2022-01-29 00:09:09 +01:00
Sylvestre Ledru
5932937952
Merge pull request #2777 from jfinkels/uucore-printf
...
uucore: move printf::memo module to uucore
2022-01-25 23:22:27 +01:00
Sylvestre Ledru
c4a74c2231
Fix doc warnings in entries.rs ( #2901 )
2022-01-21 23:13:54 +01: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
d9afdf0527
uucore: move printf::memo module to uucore
...
Move the `printf::memo` module to `uucore` so that it can be used by
other programs, not just `printf`. For example, the `-f` option to `seq`
requires parsing and formatting numbers according to the same logic as
`printf`.
2022-01-17 08:46:45 -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
37ab05bd7a
cp: clap 3
2022-01-11 19:16:47 +01:00
Terts Diepraam
c76a06e6ea
uucore: 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
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
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
Sylvestre Ledru
969f3cbf39
Merge pull request #2793 from tertsdiepraam/cksum-result-io-error
...
`cksum`: use `UIoError`
2022-01-07 21:47:01 +01:00
Terts Diepraam
7fa720d311
fix lint, fmt & udeps errors
2022-01-01 19:43:44 +01:00
Terts Diepraam
62341112df
remove cut-specific macros
2022-01-01 18:50:34 +01:00
Terts Diepraam
c075f105a4
remove unnecessary and unused macros
2022-01-01 18:31:47 +01:00
Jeffrey Finkelstein
f2bf1a7ff7
fixes suggested by nightly version of clippy
2021-12-26 15:45:33 -05:00
Terts Diepraam
8885263ad5
cksum: use UIoError
2021-12-26 18:41:25 +01:00
Ryan Gonzalez
23c0734a62
uucore::fsext: Fix mountinfo parsing w/ multiple optional fields
...
proc(5) mentions the following for the fields section and hyphen:
> (7) optional fields: zero or more fields of the form "tag[:value]";
> see below.
> (8) separator: the end of the optional fields is marked by a single
> hyphen.
IOW, there may actually be multiple optional fields, not just one, in
which case the previously hardcoded indexes for the filesystem type and
device name are now incorrect. Now, the filesystem type and device name
are parsed relative to the hypen's location, ensuring that they will be
correct regardless of the number of optional fields.
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
2021-12-20 08:46:22 -06:00
Jan Verbeek
ceff2690d2
getgroups: Reuse buffer, add comment about performance
2021-11-26 14:48:34 +01:00
Jan Verbeek
b125159535
getgroups: Handle race conditions properly
2021-11-26 14:48:34 +01:00
Jan Verbeek
412a81e7bf
uucore::entries: Remove unnecessary unsafe Vec operations
2021-11-26 14:48:33 +01:00
Jan Verbeek
f2ddae93fa
uucore::entries: Make Passwd::locate and Group::locate thread-safe
2021-11-26 14:48:33 +01:00
Roy Ivy III
03e0cbb020
update 'nix' within workspace to force patched version
2021-11-19 17:55:03 -06:00
Sylvestre Ledru
6c6e047453
Merge pull request #2586 from Funky185540/docs/document-macros
...
macros: Add documentation with examples to macros
2021-11-19 21:50:38 +01:00
Sylvestre Ledru
b4416abc82
Merge pull request #2743 from thomasqueirozb/who_uresult
...
who: use UResult
2021-11-19 21:41:14 +01:00
Thomas Queiroz
235152a6b7
uucore/utmpx: remove unwrap in cannon_host
...
Default to hostname if getaddrinfo fails
2021-11-09 20:00:34 -03:00
Jan Verbeek
77e1570ea0
Move display::Quotable into its own crate
...
The standalone version has a number of bugfixes compared to the old
version.
2021-11-08 23:07:40 +01:00
Michael Debertol
bb35b0c37b
uucore: add FileInformation
2021-11-01 22:38:44 +01:00
Thomas Queiroz
007f1b9f84
uu+tests: use strip_prefix and strip_suffix
2021-10-24 12:23:32 -03:00
Sylvestre Ledru
59e9870c56
Prepare version 0.0.8
2021-10-23 19:21:50 +02:00
James Robson
0b2483452a
Add symbolic mode support to mkdir
2021-10-16 12:57:55 +01:00
Sylvestre Ledru
a0f538f2e8
Merge pull request #2679 from blyxxyz/uucore-inspection
...
uucore: Minor cleanup
2021-09-19 22:28:16 +02:00
Sylvestre Ledru
522d4d39e3
Merge pull request #2680 from blyxxyz/utmpx-safety
...
uucore::utmpx: Make thread-safe
2021-09-18 16:15:52 +02:00
Jeffrey Finkelstein
f95ab2f43c
uucore(panic): guard against "Broken pipe" panics
...
Add "Broken pipe" to the set of panic messages used to determine whether
a panic is caused by a broken pipe error.
2021-09-14 21:26:50 -04:00
Jan Verbeek
519c0d16b3
uucore::utmpx: Make thread-safe
2021-09-14 21:17:50 +02:00
Michael Debertol
5c97c1ccc4
Merge pull request #2678 from blyxxyz/io-error-detect-os
...
Do not discard non-OS error messages
2021-09-14 20:21:48 +02:00
Jan Verbeek
601ea3ef19
uucore::process: Add a few notes
2021-09-14 19:55:00 +02:00