aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/fish_key_reader.cpp
Commit message (Collapse)AuthorAge
* don't allow f-k-r to run if stdin/stdout not a ttyGravatar Kurtis Rader2016-06-26
| | | | | | | | Another developer noticed that redirecting stdin of `fish_key_reader` results in weird behavior. Which is not at all surprising. So add checks to ensure stdin and stdout are attached to a tty. Add some rudimentary unit tests for this program.
* fix fish_key_reader.cpp so it builds on linuxGravatar Kurtis Rader2016-06-26
|
* add more ways to exit fish_key_readerGravatar Kurtis Rader2016-06-26
| | | | | | | | | | A discussion on Gitter proposed allowing the user to signal their desire to exit fish_key_reader by pressing \cC or \cD twice in a row. This implements that. I also decided to refactor how signals are handled. Most notably receiving a signal will no longer print a diagnostic message unless you've enabled debugging with `-d2` (or higher level).
* fix setting the fish_key_reader localeGravatar Kurtis Rader2016-06-25
| | | | | | | | | | In addition to fixing the setting of the locale to C/POSIX this also corrects several problems introduced by the commits made in the past couple of days. As a consequence of dealing with all of this I decided to refactor the code to simplify one of the overly long functions I introduced in my previous change. Fixes #3168
* Style fixes.Gravatar Aaron Gyes2016-06-23
|
* fish_key_reader: ms were off by factor of ten.Gravatar Aaron Gyes2016-06-23
| | | | Improve output.
* std::isnan()Gravatar Aaron Gyes2016-06-23
|
* proc_init() doesn't need to be called.Gravatar Aaron Gyes2016-06-23
| | | | I don't know why I added that, that's how "bogosities" are born.
* Make IWYU output in lint.cpp less messyGravatar Aaron Gyes2016-06-23
| | | | And re-run IWYU, adjust #includes.
* Fix up key_readerGravatar Aaron Gyes2016-06-23
| | | | | | | | | | * Correct notice about ^C * Move time deltas to end of the line away from the important info on left. * Use timef() instead of gettimteofday() ourselves * Show time in ms (is this even useful in any unit? Maybe testing escape delays...) * Make init more similar to other apps.
* simplify, and fix, setting the current localeGravatar Kurtis Rader2016-06-05
| | | | | | | | | | Fix test setup bogosities. Specifically, they weren't hermetic with respect to locale env vars. Rewrite the handling of locale vars to simplify the code and make it more like the pattern most programs employ. Fixes #3110
* tty driver ignore lnext (\cV) and werase (\cW)Gravatar Kurtis Rader2016-05-25
| | | | | | | | | | Configure the tty driver to ignore the lnext (\cV) and werase (\cW) characters so they can be bound to fish functions. Correct the `fish_key_bindings` program to initialize the tty in the same manner as the `fish` program. Fixes #3064
* add (or restore) config.h to all filesGravatar David Adam2016-05-18
| | | | | | | | The autoconf-generated config.h contains a number of directives which may alter the behaviour of system headers on certain platforms. Always include it in every C++ file as the first include. Closes #2993.
* enhance the key_reader programGravatar Kurtis Rader2016-05-10
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