exa/src/options
Benjamin Sago 2d1f462bfa Switch to the new options parser
This commit removes the dependency on the ‘getopts’ crate entirely, and re-writes all its uses to use the new options parser instead.

As expected there are casualties galore:

- We now need to collect the options into a vector at the start, so we can use references to them, knowing they’ll be stored *somewhere*.
- Because OsString isn’t Display, its Debug impl gets used instead. (This is hopefully temporary)
- Options that take values (such as ‘sort’ or ‘time-style’) now parse those values with ‘to_string_lossy’. The ‘lossy’ part means “I’m at a loss for what to do here”
- Error messages got a lot worse, but “--tree --all --all” is now a special case of error rather than just another Misfire::Useless.
- Some tests had to be re-written to deal with the fact that the parser works with references.
- ParseError loses its lifetime and owns its contents, to avoid having to attach <'a> to Misfire.
- The parser now takes an iterator instead of a slice.
- OsStrings can’t be ‘match’ patterns, so the code devolves to using long Eq chains instead.
- Make a change to the xtest that assumed an input argument with invalid UTF-8 in was always an error to stderr, when that now in fact works!
- Fix a bug in Vagrant where ‘exa’ and ‘rexa’ didn’t properly escape filenames with spaces in.
2017-07-26 17:48:18 +01:00
..
dir_action.rs Switch to the new options parser 2017-07-26 17:48:18 +01:00
filter.rs Switch to the new options parser 2017-07-26 17:48:18 +01:00
flags.rs Switch to the new options parser 2017-07-26 17:48:18 +01:00
help.rs Document --time-style, and completions 2017-07-06 00:52:27 +01:00
misfire.rs Switch to the new options parser 2017-07-26 17:48:18 +01:00
mod.rs Switch to the new options parser 2017-07-26 17:48:18 +01:00
parser.rs Switch to the new options parser 2017-07-26 17:48:18 +01:00
view.rs Switch to the new options parser 2017-07-26 17:48:18 +01:00