README: clarify config docs location

This commit is contained in:
Mitchell Hashimoto
2024-11-26 16:35:27 -08:00
parent 12fc439ce2
commit f12ac32c97

View File

@ -107,25 +107,40 @@ palette = 7=#a89984
palette = 15=#fbf1c7 palette = 15=#fbf1c7
``` ```
You can view all available configuration options and their documentation #### Configuration Documentation
by executing the command `ghostty +show-config --default --docs`. Note that
this will output the full default configuration with docs to stdout, so There are multiple places to find documentation on the configuration options.
you may want to pipe that through a pager, an editor, etc. All locations are identical (they're all generated from the same source):
1. There are HTML and Markdown formatted docs in the
`$prefix/share/ghostty/docs` directory. This directory is created
when you build or install Ghostty. The `$prefix` is `zig-out` if you're
building from source (or the specified `--prefix` flag). On macOS,
`$prefix` is the `Contents/Resources` subdirectory of the `.app` bundle.
2. There are man pages in the `$prefix/share/man` directory. This directory
is created when you build or install Ghostty.
3. In the CLI, you can run `ghostty +show-config --default --docs`.
Note that this will output the full default configuration with docs to
stdout, so you may want to pipe that through a pager, an editor, etc.
4. In the source code, you can find the configuration structure in the
[Config structure](https://github.com/ghostty-org/ghostty/blob/main/src/config/Config.zig).
The available keys are the keys verbatim, and their possible values are typically
documented in the comments.
5. Not documentation per se, but you can search for the
[public config files](https://github.com/search?q=path%3Aghostty%2Fconfig&type=code)
of many Ghostty users for examples and inspiration.
> [!NOTE] > [!NOTE]
> >
> You'll see a lot of weird blank configurations like `font-family =`. This > You may see strange looking blank configurations like `font-family =`. This
> is a valid syntax to specify the default behavior (no value). The > is a valid syntax to specify the default behavior (no value). The
> `+show-config` outputs it so it's clear that key is defaulting and also > `+show-config` outputs it so it's clear that key is defaulting and also
> to have something to attach the doc comment to. > to have something to attach the doc comment to.
You can also see and read all available configuration options in the source
[Config structure](https://github.com/ghostty-org/ghostty/blob/main/src/config/Config.zig).
The available keys are the keys verbatim, and their possible values are typically
documented in the comments. You also can search for the
[public config files](https://github.com/search?q=path%3Aghostty%2Fconfig&type=code)
of many Ghostty users for examples and inspiration.
> [!NOTE] > [!NOTE]
> >
> Configuration can be reloaded on the fly with the `reload_config` > Configuration can be reloaded on the fly with the `reload_config`