Commit graph

95 commits

Author SHA1 Message Date
Daniel Eades
a2d5f06be4 remove needless pass by value 2022-01-30 15:08:26 +01:00
Terts Diepraam
eb82015b23 all: change macros
- Change the main! proc_macro to a bin! macro_rules macro.
- Reexport uucore_procs from uucore
- Make utils to not import uucore_procs directly
- Remove the `syn` dependency and don't parse proc_macro input (hopefully for faster compile times)
2022-01-29 15:26:32 +01:00
Terts Diepraam
9c8e865b55 all: enable infer long arguments in clap 2022-01-29 02:06:29 +01:00
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
Terts Diepraam
8872485922 Merge branch 'main' into clap-3 2022-01-17 13:25:51 +01:00
Sylvestre Ledru
fcff6fec6d Force minimal version of chrono to avoid a security issue
See: https://rustsec.org/advisories/RUSTSEC-2020-0071.html
2022-01-16 23:33:12 +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
1f2c3064b8 du: clap 3 2022-01-11 19:16:47 +01:00
Terts Diepraam
7fa720d311 fix lint, fmt & udeps errors 2022-01-01 19:43:44 +01:00
Terts Diepraam
c075f105a4 remove unnecessary and unused macros 2022-01-01 18:31:47 +01:00
Sylvestre Ledru
59e9870c56 Prepare version 0.0.8 2021-10-23 19:21:50 +02:00
Jan Verbeek
259f18fcab Update message quoting and filename printing 2021-09-07 19:49:01 +02:00
Jan Verbeek
60df3c6b7c uucore: Cache args_os(), util_name(), execution_phrase()
And remove args() because there's no valid use for it, invalid unicode
handling is specified in a different way.
2021-09-07 18:51:25 +02:00
Michael Debertol
252220e9eb refactor/uucore ~ make util_name and execution_phrase functions
Since util_name and execution_phrase no longer rely on features that are
only available to macros, they may as well be plain functions.
2021-08-14 17:55:18 +02:00
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
Roy Ivy III
c0854000d1 refactor ~ use execution_phrase!() for usage messaging 2021-08-14 14:01:33 +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
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
sagudev
4f4338f1c0 Delete all allow(nonstandard_macro_braces) and fix other clippy warnings 2021-07-25 18:51:16 +02:00
Sylvestre Ledru
26a882551b update the dep to uucore_procs 0.0.6 2021-07-11 21:04:11 +02:00
Sylvestre Ledru
1d8a66b7d3 Update to version 0.0.7 2021-07-11 18:04:56 +02:00
Sylvestre Ledru
d4f27f1454 rustfmt the recent change 2021-07-11 11:23:51 +02:00
Sylvestre Ledru
caf984bd55 fix various clippy issues 2021-07-11 11:22:33 +02:00
Anup Mahindre
a9ba4c6d9f du: Use UResult 2021-07-04 22:44:25 +05:30
Sylvestre Ledru
91078cfcb3
Merge pull request #2445 from syukronrm/du-inodes
du: add `--inodes`
2021-07-04 11:28:03 +02:00
Syukron Rifail M
27e0507844 du: more tests 2021-06-28 07:51:17 +07:00
Syukron Rifail M
d8a33da5b3 du: add --inodes 2021-06-28 07:51:17 +07:00
Michael Debertol
2ebca384c6 all utils: enable wrap_help
This makes clap wrap the help text according to the terminal width,
which improves readability for terminal widths < 120 chars,
because clap defaults to a width of 120 chars without this feature.
2021-06-27 16:17:10 +02:00
Michael Debertol
0531153fa6 uutils: move clap::App creation to separate functions 2021-06-25 21:23:45 +02:00
Jan Scheer
c0be979611 fix some issues with locale (replace "LANGUAGE" with "LC_ALL")
`LANGUAGE=C` is not enough, `LC_ALL=C` is needed as the environment
variable that overrides all the other localization settings.

e.g.
```bash
$ LANGUAGE=C id foobar
id: ‘foobar’: no such user

$ LC_ALL=C id foobar
id: 'foobar': no such user
```

* replace `LANGUAGE` with `LC_ALL` as environment variable in the tests
* fix the the date string of affected uutils
* replace `‘` and `’` with `'`
2021-06-23 11:30:28 +02:00
Sylvestre Ledru
65fe9beaad
bring back #[cfg(windows)] 2021-06-19 08:58:33 +02:00
Syukron Rifail M
bc8415c9db du: add --dereference 2021-06-17 14:06:41 +07:00
Anup Mahindre
da7b02cf9d du: Refactor threshold handling 2021-06-12 23:12:44 +05:30
Anup Mahindre
d6181ce7d4 du: Add threshold argument support
- Add --threshold parameter and corresponding logic to skip listing
entires that don't adhere to the threshold
2021-06-12 19:56:05 +05:30
Jan Scheer
39f5f70f2b Merge branch 'master' into refactoring_parse_size 2021-06-12 02:24:07 +02:00
Syukron Rifail M
0c364e635b du: add --one-file-system 2021-06-11 16:18:57 +07:00
Sylvestre Ledru
667af7ea16
Merge pull request #2388 from youknowone/du-winapi
du winapi dependency only for windows
2021-06-10 21:31:08 +02:00
Jeong YunWon
3ee09fa783 only matches Some() in match 2021-06-10 18:39:11 +09:00
Jeong YunWon
9c6750252d du winapi dependency only for windows 2021-06-10 15:07:46 +09:00
Jeong YunWon
774c01f008 Remove trivially unnessessary unwrap() from du 2021-06-10 13:11:36 +09:00
Jan Scheer
be8650278b Merge branch 'master' into refactoring_parse_size 2021-06-09 13:44:40 +02:00
Roy Ivy III
3409dc93e3 refactor/du ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:23 -05:00
Roy Ivy III
c192550f22 refactor ~ polish spelling + add spelling exceptions 2021-06-06 19:28:22 -05:00
Roy Ivy III
3cfb956684 refactor/du ~ fix cargo clippy warning (clippy::ptr_arg) 2021-06-06 19:17:18 -05:00
Jan Scheer
12de58aec0 Merge branch 'master' of github.com:uutils/coreutils into refactoring_parse_size 2021-06-06 22:54:02 +02:00
Jan Scheer
884f570125 du/od/sort: refactor - replace map_or_else with unwrap_or_else 2021-06-06 21:55:39 +02:00