The ureq dependency is causing compilation errors on various platforms (see #3184, #3216, #3375). Hence we remove that dependency and do not automatically download the archive anymore. Instead, we ask the user to download it separately when the archive is not found.
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.
This adds a hidden `completion` subcommand to coreutils. When invoked with
`coreutils completion <utility> <shell>` a completion file will be printed
to stdout. When running `make install` those files will be created for all
utilities and copied to the appropriate locations.
`make install` will install completions for zsh, fish and bash; however,
clap also supports generating completions for powershell and elvish.
With this patch all utilities are required to have a publich uu_app function
that returns a clap::App in addition to the uumain function.
New tests in busybox are based on the fact that the function
appears in the usage of the busybox binary.
Because the tests are searching for an exact string they don't see
the function defined by coreutils.
By using the exact same string as busybox we can now also run the new
busybox tests
## [why]
`std::env::current_exe()` has platform dependent behavior and will often
return the target binary, not the symlink name, when the binary is executed
via symlink. So, to support symlinking, the first (0th) arg from `std::env::args()`
is used, when possible, with fallback to `std::env::current_ext()` if args are
missing or empty.
- ref: <https://github.com/rust-lang/rust/issues/43617>
- final multi-binary will now function correctly with any binary/executable name
- multi-binary container acts as the specified util IF EITHER ...
1. the binary/executable name exactly matches the name of an applet/util
2. the binary/exectuable name matches <PREFIX><UTIL_NAME> pattern
* where the PREFIX is any string ending in a non-alphanumeric character