Commit graph

40 commits

Author SHA1 Message Date
Sylvestre Ledru
be0b77e7a7 when help item has an \n, translate it to a <br />
example:
https://uutils.github.io/coreutils-docs/user/utils/ls.html / classify
2022-02-19 13:44:15 +01:00
Sylvestre Ledru
716444c7b1 user docs: move the examples after the options 2022-02-19 12:46:57 +01:00
Sylvestre Ledru
7870317178
Merge pull request #3152 from tertsdiepraam/docs-examples
docs: add examples from tldr-pages
2022-02-19 09:49:45 +01:00
Terts Diepraam
69a94e412b docs: use rust libraries for downloading and unzipping tldr 2022-02-19 01:27:19 +01:00
Terts Diepraam
f57e3470ae docs: add examples from tldr-pages 2022-02-17 19:35:56 +01:00
Sylvestre Ledru
65467ab317
Merge pull request #3137 from tertsdiepraam/docs-multiline-usage
docs: allow for multiline usage
2022-02-15 10:26:47 +01:00
Terts Diepraam
ac11d8793e docs: add page with test coverage 2022-02-13 23:14:13 +01:00
Terts Diepraam
4f7f4445cb docs: allow for multiline usage 2022-02-13 21:45:43 +01:00
Daniel Eades
4f8d1c5fcf add additional lints 2022-01-31 20:40:47 +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
784f2e2ea1 use semicolons if nothing returned 2022-01-30 15:08:26 +01:00
Daniel Eades
5af66753af remove needless borrows 2022-01-30 14:01:21 +01:00
Zachary Dremann
bb41f4ffe5 Use a PHF map for util_map()
Rather than building a HashMap at compile time, use the phf (and phf_codegen) crate to build the map
at compile time in build.rs
2022-01-30 06:58:33 -05:00
Terts Diepraam
a575932115 uudoc: fix clippy lint 2022-01-22 11:59:41 +01:00
Terts Diepraam
a3ca29b612 docs: create SUMMARY.md automatically 2022-01-22 11:49:33 +01:00
Terts Diepraam
9618a2f21d docs: remove custom files 2022-01-21 20:18:36 +01:00
Terts Diepraam
ab3623f65a docs: usage and values for options 2022-01-21 19:20:55 +01:00
Terts Diepraam
5ff4796b12 docs: add version 2022-01-20 23:20:29 +01:00
Terts Diepraam
cf42008150 autogenerated mdbook documentation 2022-01-20 16:49:44 +01:00
Terts Diepraam
951035e49c mdbook docs 2022-01-20 15:00:36 +01:00
Terts Diepraam
c93298f32c coreutils: clap 3 2022-01-11 19:16:48 +01:00
Jan Verbeek
259f18fcab Update message quoting and filename printing 2021-09-07 19:49:01 +02:00
Michael Debertol
44981cab01 refactor/uucore ~ correct implementation of executable!() for multicall
- Use an atomic bool to track whether the utility name is the second
or the first argument.
- Add tests
2021-08-14 14:01:34 +02:00
Michael Debertol
0dda72eb60 coreutils: better errors for invalid args for completions
Use clap to extract command line arguments. This generates much better
error messages.
2021-06-27 16:07:43 +02:00
Michael Debertol
a9e79c72c7 uutils: enable shell completions
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.
2021-06-25 21:23:45 +02:00
Roy Ivy III
3fb8a37ace refactor ~ (bin/coreutils) polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Theophile Trunck
8bafcbab7a Update the binary usage to match busybox
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
2021-03-10 23:52:33 +01:00
Sylvestre Ledru
7942a64231 Remove 'extern crate'
Not necessary anymore. See:
https://doc.rust-lang.org/edition-guide/rust-2018/module-system/path-clarity.html#no-more-extern-crate
2020-12-31 15:44:00 +01:00
Roy Ivy III
46f30f3836 refactor/polish ~ fix cargo clippy complaint (stable_sort_primitive) 2020-10-10 20:35:35 -05:00
Alex Lyon
8377abadb6
Fix to build on Rust 1.32.0 and formatting 2020-06-16 04:08:17 -05:00
Alex Lyon
110d6844ad
Use an iterator over OsString for uumain()
Additionally, restructure `uname` so that we don't need to find the
iterator's length.
2020-06-16 03:28:02 -05:00
Roy Ivy III
8cf58de0a7 docs ~ polish/update comments 2020-05-30 01:36:02 -05:00
Roy Ivy III
f82de13847 docs ~ spell-check repairs and addition of exceptions 2020-05-30 01:36:02 -05:00
Roy Ivy III
8fa8bb61ab change ~ install_sigpipe_hook() => mute_sigpipe_panic() (from uucore v0.0.4) 2020-05-29 22:59:48 -05:00
Roy Ivy III
52ae491fcd change ~ rename base binary to 'coreutils' 2020-05-29 22:59:47 -05:00
Roy Ivy III
0cb5fbd6b5 change ~ remove transition-only and unneeded code for independent sub-crates 2020-05-29 22:59:46 -05:00
Roy Ivy III
8263d31fbb change ~ improve help display for main multi-call binary 2020-05-24 17:29:07 -05:00
Roy Ivy III
c457dfbbc4 fix/uutils ~ support function/util (aka, applet) symlink aliasing where possible
## [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>
2020-05-24 17:29:07 -05:00
Roy Ivy III
bebf36bffb change/uutils ~ allow (almost) any name for the multi-binary container
- 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
2020-05-24 17:29:07 -05:00
Roy Ivy III
f0b0e3b867 change ~ reorganize code files 2020-04-14 13:46:18 -05:00