cmdline: re-implementation of preliminary commandline argument processing
This work re-implements the preliminary commandline argument processing stage.
- Much more efficient, relatively speaking.
- Happens to fix incorrect/inconsistent parsing under certain situations of option misuse, except in a few cases that are simply unavoidable. (The results from the preliminary scan cannot always be identical to that of the later scan; the two results sets are merged together; this problem is now almost completely eliminated by cutting down the preliminary scan to just the few options that we must do a preliminary scan for).
Additionally:
- I fixed a bug whereby warnings about obsolete core options are printed twice per instance.
- We don't waste effort loading saved setting if there's an unknown option or missing value error condition.
-
Use of(Separated to possibly be re-submitted later).--no-color
will be obeyed wrt. error/warning output for cmdline arg issues.
Edited by Lyndon Brown