Previously, a config file was loaded within `start()`, and if the config
file is invalid, Zellij was supposed to show a user what's wrong with
it. However, since `start()` starts setting up its terminal with an
alternative screen buffer, neither standard output nor standard error
could display such an error.
This change intends to address this issue by making Zellij load a config
file before `start()`.
In addition, the patch also includes some refactorings:
* Redefine `from_cli_config` with `TryFrom`, which was introduced in
Rust 1.34
* Remove conditional declaration `cfg(not(test))` because `start()` now
receive a `Config` as the third argument
* Introduce [`tempfile`](https://crates.io/crates/tempfile) in order to
run tests with actual files
* Typo?: "Deserialisation" -> "Deserialization"
* Initial definitions and thoughts for hotkeys
* Actually document InputKey properly
* Add a to string function for input keys
* Define keybinds and actions; restructure
* Implement hash and start on defining key bindings
* Derive Serialize for input keys
* Store the key strings as tuples for two-way mapping
* Some string to key functions
* Use termion's Key definition and implement action dispatch
* Fix some borrow-checker errors
* Missing keybind and command mode switching
* Fix incorrect handling of spawn terminal command
* fix(plugins): work with new input - tests not passing
* fix(infra): stabilize tests and properly close pty sessions
* style(fmt): rustfmt
Co-authored-by: Brooks J Rady <b.j.rady@gmail.com>
Co-authored-by: Aram Drevekenin <aram@poor.dev>
* Add custom panic hook. Print backtrace and thread, error info on panic.
* use sync_channel and SyncSender
* nit fixes and cleanup
* disable custom panic hook while running tests
* make separate errors.rs file and address other review comments
* improve panic message
* debug: does increasing time between snapshots make tests pass? (this is temporary)
* fix(tests): suspend before sending quit command
* fix(tests): add missing use
* style(format): commas are important apparently
* fix(tests): can we get away with reducing the QUIT suspense time?
* fix(tests): can we get away with 50?
Co-authored-by: Aram Drevekenin <aram@poor.dev>