mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-21 19:26:09 +03:00

This adds a new CLI `ghostty +edit-config`. This will open the config file in the user's specified `$EDITOR`. If Ghostty has never been configured, this will also create the initial config file with some default templated contents (the same as that which we introduced back in Ghostty 1.0.1 or something -- not new behavior here). This is useful on its own because it will find the correct configuration path to open. If users are terminal users anyway (not a big stretch since this is a terminal app), this will allow them to easily edit config right away. This is also forward looking: I want to replace our "Open Config" action to open a Ghostty window executing this command so that users can edit their config in a terminal editor. This has been heavily requested since forever (short of a full GUI settings editor, which is not ready yet). I don't do this in this PR but plan to in a future PR.
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
.