readEntries had two memory bugs on the allocation failure path, both only reachable under OOM: - The map itself was never freed if we ran into an allocation failure - The unconditional `errdefer`s for the dupe'd hostname and terminfo values could double-free if there was a later allocation failure. This change restructures this function so that these values are dupe'd up-front, and then their ownership is tracked using optionals that can be null'ed out once their ownership is transferred into the map. Both of these cases are now covered by unit tests. |
||
|---|---|---|
| .. | ||
| ssh-cache | ||
| CommaSplitter.zig | ||
| Pager.zig | ||
| README.md | ||
| action.zig | ||
| args.zig | ||
| boo.zig | ||
| crash_report.zig | ||
| diagnostics.zig | ||
| edit_config.zig | ||
| explain_config.zig | ||
| ghostty.zig | ||
| help.zig | ||
| list_actions.zig | ||
| list_colors.zig | ||
| list_fonts.zig | ||
| list_keybinds.zig | ||
| list_themes.zig | ||
| lorem_ipsum.txt | ||
| new_window.zig | ||
| show_config.zig | ||
| show_face.zig | ||
| ssh.zig | ||
| ssh_cache.zig | ||
| toggle_quick_terminal.zig | ||
| tui.zig | ||
| validate_config.zig | ||
| version.zig | ||
README.md
Subcommand Actions
This is the cli specific code. It contains cli actions and tui definitions and argument parsing.
This README is meant as developer documentation and not as user documentation. For user documentation, see the main README or ghostty.org.
Updating documentation
Each cli action is defined in it's own file. Documentation for each action is defined
in the doc comment associated with the run function. For example the run function
in list_keybinds.zig contains the help text for ghostty +list-keybinds.