Mitchell Hashimoto 865ba546a9 cli: +edit-config command to open the config file in $EDITOR
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.
2025-06-24 07:17:05 -04:00
..
2025-03-12 09:55:52 -07:00
2025-05-09 10:01:06 -07:00
2024-09-27 10:53:58 -07:00
2025-03-12 09:55:52 -07:00

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.