Use my new [lscolors](https://github.com/sharkdp/lscolors) crate instead
of the internal `lscolors` module
- Speeds up `LS_COLORS` querying, leading to a nice 25% performance
improvement when
- Adds support for 24-bit colors and background colors
closes#368closes#363
* Multiple `--search-path` arguments can be supplied which replace the positional `path` argument for providing directories which will be searched.
* When a `--search-path` argument is provided, positional `path` arguments will not be allowed
This PR splits `internals.rs` into the `internal` module with multiple
files, and moves `FdOptions` into `opts.rs`.
The main motivation behind this is to move logic for constructing
`FdOptions` out of the main function and more readable and easier to
understand in the `opts` module. The goal will eventually to be able
to write `FdOptions::from(matches)` and have the options constructed.
This patch makes minor changes to make the code a little easier to
understand. For example, using the `?` operator in some fns that return
an `Option` type.
Previously, the constants defined in `src/exit_codes` weren't being
used, and the constants for exit codes were being redefined in the
`internals` module.
This PR removes the exit code consts and instead uses an enum defined in
`src/exit_codes`. This centralizes the definitions of exit codes making
them easier to modify and keep track of.
Some tests throughout the codebase were just functions marked with the
`#[test]` macro. It is convention to have these test functions in a
`test` module with a compiler guard `cfg(test)`. This PR updates the
tests that aren't already setup like this to be in the `test` module.
Additionally, this PR also adds tests to the `exec` module to check the
remaining `Token` enum variations.
This upgrades the minimum required version of Rust to 1.29 in order to
fix#288.
See also:
- Rust compiler bug ticket: rust-lang/rust#50619
- Rust compiler PR with the fix: rust-lang/rust#50630closes#288