The original `key_reader` program was useful but didn't do much that `xxd`
or `od -tx1z` didn't do. Furthermore, it wasn't built and installed by
default. This change adds features that make it superior to those programs
for decoding interactive key presses and makes it a first-class citizen
like the `fish_indent` program that is always available.
Fixes#2991
I'm going to modify these functions as part of dealing with issue #3000
and don't want those changes to be masked by running the files through
`make style`.
The fork (create new process) related debugging messages rely on an
undocumented env var and use `printf()` rather than `debug()`. There are
also errors in how the fork count is tracked that this fixes.
Fixes#2995
Some `oclint` errors regarding "useless parentheses" are meaningfull. But
the vast majority are bogus in as much as removing the parentheses reduces
readability. So fix a few of the egregious uses and otherwise suppress
that error.
I noticed that if I've previous done `make test` that a subsequent `make
style-all` attempts to restyle all the fish scripts in the *test* directory.
Those files are transient and not part of the git repository. Limit restyling
all fish scripts just to those in the *share* directory tree. There are a
couple elsewhere in the repo (e.g., *build_tools*) but they can be handled on
an individual basis.
This makes it easy for the user to request floating point output with the
desired number of digits after the decimal point (not to be confused with
significant digits).
Note that this is just a thin wrapper so someone can say `math -s3 10 / 3`
rather than `math "scale=3; 10 /3"`.
Resolves#1643
I missed restyling a few "switch" blocks to make them consistent with the rest
of the code base. This fixes that oversight. This should be the final step in
restyling the C++ code to have a consistent style. This also includes a few
trivial cleanups elsewhere.
I also missed restyling the "complete" module when working my way from a to z
so this final change includes restyling that module.
Total lint errors decreased 36%. Cppcheck errors went from 47 to 24. Oclint P2
errors went from 819 to 778. Oclint P3 errors went from 3252 to 1842.
Resolves#2902.
For this change I decided to bundle the remaining modules that need to be
resytyled because only two were large enough to warrant doing on their own.
Reduces lint errors from 225 to 162 (-28%). Line count from 3073 to 2465 (-20%).
Another step in resolving issue #2902.