mirror of
https://github.com/wez/wezterm.git
synced 2024-11-11 03:27:05 +03:00
A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
d0095f6bba
This is a bit fiddly because the serde library doesn't let us know eg: which key in a map had an error, so we have to show the information from the value and hope that there is enough context for the user. This commit adds our own Debug impl for ValueWrapper as that one provided by mlua isn't useful for tables; our impl will iterate the pairs in the table and pretty print them. The struct error message has been adjusted to include the lua value that failed to deserialize in addition to the type name. Because the config structs can get quite large, this commit adjusts the ordering of the components in the error message; we now print the outermost error first and leave the most specific portion at the bottom. This is so that the error window is more likely to show the most useful information at the bottom. I've added some similar improvements when processing enums. It's not perfect but hopefully more useful when figuring out a config problem. This invalid config: ```lua local wezterm = require 'wezterm'; return { keys = { {key="{", mods="SHIFT|ALT", action="Search"}, } } ``` yields: ``` While (re)loading configuration: Error converting lua value returned by script /tmp/issue-201.lua to Config struct: while processing a struct of type `Config` with value: { "keys": [ { "mods": "SHIFT|ALT", "key": "{", "action": "Search", }, ], } while processing a struct of type `Key` with value: { "mods": "SHIFT|ALT", "key": "{", "action": "Search", } while processing an enum of type `KeyAssignment` and value "Search" which has allowed variants `ActivateCopyMode`, `ActivateTab`, `ActivateTabRelative`, `ClearScrollback`, `CloseCurrentTab`, `CompleteSelection`, `CompleteSelectionOrOpenLinkAtMouseCursor`, `Copy`, `DecreaseFontSize`, `DisableDefaultAssignment`, `ExtendSelectionToMouseCursor`, `Hide`, `HideApplication`, `IncreaseFontSize`, `MoveTab`, `MoveTabRelative`, `Nop`, `OpenLinkAtMouseCursor`, `Paste`, `PastePrimarySelection`, `QuitApplication`, `ReloadConfiguration`, `ResetFontSize`, `ScrollByPage`, `Search`, `SelectTextAtMouseCursor`, `SendString`, `Show`, `ShowLauncher`, `ShowTabNavigator`, `SpawnCommandInNewTab`, `SpawnCommandInNewWindow`, `SpawnTab`, `SpawnWindow`, `ToggleFullScreen` Expected a variant with parameters but got a unit variant instead ``` refs: https://github.com/wez/wezterm/issues/201 |
||
---|---|---|
.cargo | ||
.github | ||
assets | ||
base91 | ||
ci | ||
deps | ||
docs | ||
filedescriptor | ||
promise | ||
pty | ||
rangeset | ||
src | ||
tabout | ||
term | ||
termwiz | ||
vtparse | ||
window | ||
.gitignore | ||
.gitmodules | ||
.rustfmt.toml | ||
build.rs | ||
Cargo.lock | ||
Cargo.toml | ||
CONTRIBUTING.md | ||
get-deps | ||
install.sh | ||
LICENSE.md | ||
README.md | ||
wt-record | ||
wt-replay |
Wez's Terminal
A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
User facing home page at: https://wezfurlong.org/wezterm/
Screenshot of wezterm on macOS, running vim
Installation
https://wezfurlong.org/wezterm/installation.html
Getting help
This is a spare time project, so please bear with me. There are two channels for support:
- You can use the GitHub issue tracker to see if someone else has a similar issue, or to file a new one: https://github.com/wez/wezterm/issues
- There is a Gitter room which is bridged to the Matrix/Riot.im for (potentially!) real time discussions
The Gitter/Matrix room is probably better suited to questions than it is to bug reports, but don't be afraid to use whichever you are most comfortable using and we'll work it out.