Commit graph

1707 commits

Author SHA1 Message Date
Alex Lyon
217d83526b Set up for release on crates.io 2020-11-08 19:56:54 -06:00
Alex Lyon
12ce90d9cb Fix doc-test for entries on macOS 2020-11-08 19:56:54 -06:00
Alex Lyon
cdafcce400 Redox is not tested currently, so don't mention it 2020-11-08 19:56:54 -06:00
Alex Lyon
12129d1b1c Separate uucore into its own repository 2020-11-08 19:56:54 -06:00
Alex Lyon
76aef60d80 uucore: allow the Linux zero-copy setup on Android 2020-11-08 19:56:54 -06:00
Alex Lyon
f79f0716ee uucore: remove an inaccurate comment 2020-11-08 19:56:54 -06:00
Alex Lyon
72c322a882 uucore, yes: add zero-copy on supported platforms (only Linux currently) 2020-11-08 19:56:54 -06:00
Alex Lyon
d81d3e3c71 Get rid of all warnings on Linux (or at least WSL) 2020-11-08 19:56:54 -06:00
Zachary Dremann
77cc8d39c6 Replace starts_with and slice with trim_left_matches 2020-11-08 19:56:54 -06:00
Zachary Dremann
c15b18bf5b Don't allocate in signal_by_name_or_value 2020-11-08 19:56:54 -06:00
Zachary Dremann
30df2210f0 Fix is_signal 2020-11-08 19:56:54 -06:00
Zachary Dremann
44550ee5b6 Add tests for signals (including failing test for is_signal 2020-11-08 19:56:54 -06:00
Alex Lyon
4e0025cb17 base32, base64, uucore: merge base32/base64 code 2020-11-08 19:56:54 -06:00
Roy Ivy III
6600993c3e fix: gate unix-only macros (silences "unused" warnings) 2020-11-08 19:56:53 -06:00
Vinzent Steinberg
5f582c05e1 Remove utf8 feature
All code it provides can be implemented with `std`.
2020-11-08 19:56:53 -06:00
Vinzent Steinberg
5160f47a9f Fix more clippy warnings and remove redundant 'static 2020-11-08 19:56:53 -06:00
Vinzent Steinberg
de7a6b5afa Fix a few clippy warnings 2020-11-08 19:56:53 -06:00
Roy Ivy III
bd450ebb94 uucore: fix: use updated 'wild' crate for globbing 2020-11-08 19:56:53 -06:00
Roy Ivy III
9e8b002735 uucore: fix: use forked 'wild' crate with case-sensitivity + API fixes 2020-11-08 19:56:53 -06:00
Roy Ivy III
03d6e733e4 uucore: Add globbing for Windows machines 2020-11-08 19:56:53 -06:00
dependabot[bot]
99da2451ab Bump getopts from 0.2.17 to 0.2.18
Bumps [getopts](https://github.com/rust-lang/getopts) from 0.2.17 to 0.2.18.
- [Release notes](https://github.com/rust-lang/getopts/releases)
- [Commits](https://github.com/rust-lang/getopts/compare/0.2.17...v0.2.18)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2020-11-08 19:56:53 -06:00
dependabot[bot]
b21bd0bea3 Bump time from 0.1.39 to 0.1.40
Bumps [time](https://github.com/rust-lang/time) from 0.1.39 to 0.1.40.
- [Release notes](https://github.com/rust-lang/time/releases)
- [Commits](https://github.com/rust-lang/time/compare/0.1.39...0.1.40)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2020-11-08 19:56:53 -06:00
dependabot[bot]
a31b1047c1 Bump libc from 0.2.39 to 0.2.42
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.39 to 0.2.42.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.39...0.2.42)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2020-11-08 19:56:53 -06:00
Alex Lyon
40738bfb0a uucore: update data_encoding and add wrap_write() 2020-11-08 19:56:53 -06:00
Valentin Lorentz
2ad767586b chmod: show human-friendly permissions when --changes or --verbose is used.
Like GNU chmod.
2020-11-08 19:56:53 -06:00
Ian Douglas Scott
eedf7cb28a Make the 'cat' utility build on Redox 2020-11-08 19:56:53 -06:00
Alex Lyon
07de3eda6e uucore: make features opt-in rather than opt-out 2020-11-08 19:56:53 -06:00
Alex Lyon
f74a1b6333 Format everything using rustfmt 2020-11-08 19:56:53 -06:00
Alex Lyon
1c0b1ab375 uucore: remove utsname.rs (and replace with platform-info) 2020-11-08 19:56:53 -06:00
Alex Lyon
ca3393bd86 uucore: read from sys:uname on Redox 2020-11-08 19:56:52 -06:00
Alex Lyon
7559c0d83d cp, tail: update winapi 2020-11-08 19:56:52 -06:00
Alex Lyon
f575b8f4f2 arch: add support for building on Windows 2020-11-08 19:56:52 -06:00
Alex Lyon
3cec199da1 Add Sphinx documentation to generate man pages 2020-11-08 19:56:52 -06:00
Alex Lyon
64c2c2055b chmod, install, uucore: fix build on Windows 2020-11-08 19:56:52 -06:00
Alex Lyon
5544def54e Remove pipe_* macros 2020-11-08 19:56:52 -06:00
Alex Lyon
f0bd170996 chmod, install: move mode parsing into uucore 2020-11-08 19:56:52 -06:00
Alex Lyon
fd555c6d21 Handle SIGPIPE correctly and autogenerate main() for each util 2020-11-08 19:56:52 -06:00
Joshua Miller
6998949c06 pin dependencies 2020-11-08 19:56:52 -06:00
Matt8898
e7940828f9 uucore: add support for optflagmulti and optmulti. 2020-11-08 19:56:52 -06:00
Arcterus
e2b8741a35 uucore: compile on Windows again 2020-11-08 19:56:52 -06:00
Arcterus
f61f30f52b uucore: read symlinked directories correctly in resolve_relative_path() 2020-11-08 19:56:52 -06:00
Joseph Crail
f3639b9453 Fix comment spelling 2020-11-08 19:56:52 -06:00
Lei Zhang
3f4dba0de9 Turn off utmpx and signals for Fuchsia.
Fuchsia uses musl as its libc; musl only has stub implementation
for utmpx. From their wiki, that is deliberately chosen.

Fuchsia doesn't have signals mechanism.
2020-11-08 19:56:52 -06:00
Will Wykeham
cf2be8a6b1 Fix a number of Windows build warnings 2020-11-08 19:56:52 -06:00
knight42
09b0b9ad78 chown,chgrp: fix bug in option --preserve-root 2020-11-08 19:56:51 -06:00
knight42
b6dcafc675 uucore::fs: add fn resolve_relative_path 2020-11-08 19:56:51 -06:00
Nathan Ross
22fab1444e uucore: allow 'wrong number of arguments' macro to be more precise 2020-11-08 19:56:51 -06:00
Nathan Ross
8cb2edecb1 uucore: add support for optflagopt to coreopts 2020-11-08 19:56:51 -06:00
Nathan Ross
35951ebf66 uucore: fix utility name in coreopts parsing error messages 2020-11-08 19:56:51 -06:00
Knight
1dab4510b5 Remove uucore::c_types 2020-11-08 19:56:51 -06:00
Knight
d22814201e Add uucore::utsname to get system info 2020-11-08 19:56:51 -06:00
Knight
05b5317605 uucore::process: add functions to obtain uid/gid, euid/egid 2020-11-08 19:56:51 -06:00
Knight
5bc2276775 Add uucore::entries 2020-11-08 19:56:51 -06:00
Knight
434aae76bc uucore::utmpx: fix doctest errors 2020-11-08 19:56:51 -06:00
Knight
0277848de7 uucore: make libc optional 2020-11-08 19:56:51 -06:00
nathanross
50887566ea uucore: coreopts alignment, spacing, and optional usage 2020-11-08 19:56:51 -06:00
Nathan Ross
73d36a1d88 uucore: require version; syntax; summary; longhelp 2020-11-08 19:56:51 -06:00
Knight
6a22120d7b uucore::utmpx: change API and fix error 2020-11-08 19:56:51 -06:00
Knight
58b6ac9393 uucore::utmpx: refine implementation 2020-11-08 19:56:51 -06:00
Knight
3751142ccb coreopts: fix error when using msg_wrong_number_of_arguments macro 2020-11-08 19:56:50 -06:00
Knight
68ad14f3c4 uucore: conditional enable different features 2020-11-08 19:56:50 -06:00
Knight
25018b112b uucore: export latest libc 2020-11-08 19:56:50 -06:00
Knight
789141d926 coreopts: display package name instead of module path 2020-11-08 19:56:50 -06:00
Nathan Ross
bcec54f572 uucore: CoreOptions error and version message templates 2020-11-08 19:56:50 -06:00
Nathan Ross
76952579ac uucore: add message templates 2020-11-08 19:56:50 -06:00
Knight
2c78b92801 uucore: add module encoding 2020-11-08 19:56:50 -06:00
Corey Farwell
bcdb682bf8 Remove unused imports. 2020-11-08 19:56:50 -06:00
Corey Farwell
c6909951aa Cleanup logic around wait_or_timeout exit status handling. 2020-11-08 19:56:50 -06:00
Corey Farwell
72d2ab208c Prefer handling Duration over f32 when dealing with times.
Also refactored out usage of the `time` crate in `uucore`.
2020-11-08 19:56:50 -06:00
Knight
463c6af4e3 uucore: update utmpx 2020-11-08 19:56:50 -06:00
Knight
79b6835612 pinky: cleanup the code 2020-11-08 19:56:50 -06:00
Knight
6e2c3ede40 uucore::utmpx: revert the changes 2020-11-08 19:56:50 -06:00
Knight
967babd1e6 pinky: implement short format 2020-11-08 19:56:50 -06:00
Knight
b0588e482e uucore: add disp_err macro 2020-11-08 19:56:50 -06:00
Shiroy
713770c9ae Add missing lib.name for uucore
Fix build on Linux
2020-11-08 19:56:50 -06:00
Arcterus
a149efe45a uucore: don't follow symlinks when examining them (fixes #799) 2020-11-08 19:56:49 -06:00
Michael Gehring
512a6a3201 expand, unexpand: fix build on stable 2020-11-08 19:56:49 -06:00
Michael Gehring
0a3a2ca935 Fix clippy warnings 2020-11-08 19:56:49 -06:00
Michael Gehring
ce733b38a9 Fix arm build
Fixes #719
2020-11-08 19:56:49 -06:00
Joseph Crail
bde309a29f Remove trait shim needed before Path stabilized
Now that Path has stabilized in Rust 1.5, I removed the UUPathExt trait
needed to support stable, beta, and nightly.
2020-11-08 19:56:49 -06:00
Joseph Crail
0678332a1f Add macro to properly find program name. 2020-11-08 19:56:49 -06:00
Joseph Crail
b8ee12f703 More import fixes for Windows. 2020-11-08 19:56:49 -06:00
Joseph Crail
3863842fae Fix errors with bools represented as ints. 2020-11-08 19:56:49 -06:00
Joseph Crail
9c4c9f6782 Refactor check for standard stream interactivity.
Since several utilities check if the standard streams are interactive, I
moved this into the uucore::fs library as is_std*_interactive(). I also
added Windows support for these methods, which only return false (or at
least until someone finds a way to support this).
2020-11-08 19:56:49 -06:00
Joseph Crail
14eccb4335 uucore: specify a few modules to be Unix-only 2020-11-08 19:56:49 -06:00
Michael Gehring
23e0315262 Remove deprecated lint 2020-11-08 19:56:49 -06:00
Joseph Crail
6095dfee66 Split utility files into separate library.
Everything in src/common has been moved to src/uucore. This is defined
as a Cargo library, instead of directly included. This gives us
flexibility to make the library an external crate in the future.

Fixes #717.
2020-11-08 19:56:42 -06:00
Sylvestre Ledru
a3f3a050a8
Merge pull request #1618 from sylvestre/wc-clap
refactor(wc): use clap instead of getopts
2020-11-03 09:39:53 +01:00
Sylvestre Ledru
38e90b9a03
Merge pull request #1621 from sylvestre/clap-stat
refactor(stat): Move to clap
2020-11-03 08:37:39 +01:00
Sylvestre Ledru
57c83db6b6
Merge pull request #1616 from sylvestre/users
refactor(users): move to clap and simplify the code a bit
2020-11-03 08:37:16 +01:00
Sylvestre Ledru
bd41cb621b
Merge pull request #1620 from sylvestre/clap-printenv
refactor(printenv): use clap instead of getopts
2020-11-03 08:36:56 +01:00
Sylvestre Ledru
32ccd7d54d
Merge pull request #1619 from sylvestre/rmdir-clap
refactor(rmdir): use clap instead of getopts
2020-11-03 08:36:25 +01:00
Sylvestre Ledru
daf0f96b94
Update of the about description
Co-authored-by: Roy Ivy III <rivy.dev@gmail.com>
2020-11-02 22:47:55 +01:00
Sylvestre Ledru
2ad587ccbd
Update of the about description
Co-authored-by: Roy Ivy III <rivy.dev@gmail.com>
2020-11-02 22:32:44 +01:00
Sylvestre Ledru
1e37c29b1f refactor(stat): Move to clap 2020-11-02 22:18:51 +01:00
Sylvestre Ledru
58099f4203 refactor(wc): use clap instead of getopts 2020-10-29 20:40:00 +01:00
Roy Ivy III
114fda0519 tests ~ (sub-crate factor) refactor divisor() test for improved readability 2020-10-26 15:06:29 -05:00
Roy Ivy III
ae06368cd8 polish/factor ~ correct spelling 2020-10-26 15:06:29 -05:00
Roy Ivy III
6a525c950d perf/factor ~ tune number of stack inlined decomposition values (~1% time improvement) 2020-10-26 15:06:29 -05:00
Roy Ivy III
6eea8c5f30 perf/factor ~ improve factor() quotient and loop comparison (~6% time improvement) 2020-10-26 15:06:28 -05:00