Merge pull request #836 from mitchellh/pf/docs

Revise key sections of docs
This commit is contained in:
Mitchell Hashimoto
2023-11-14 09:23:32 -08:00
committed by GitHub

View File

@ -2,7 +2,7 @@
<h1> <h1>
<p align="center"> <p align="center">
<img src="https://user-images.githubusercontent.com/1299/199110421-9ff5fc30-a244-441e-9882-26070662adf9.png" alt="Logo" width="100"> <img src="https://user-images.githubusercontent.com/1299/199110421-9ff5fc30-a244-441e-9882-26070662adf9.png" alt="Logo" width="100">
<br>ghostty <br>Ghostty
</h1> </h1>
<p align="center"> <p align="center">
GPU-accelerated terminal emulator pushing modern features. GPU-accelerated terminal emulator pushing modern features.
@ -22,25 +22,26 @@
## About ## About
ghostty is a cross-platform, GPU-accelerated terminal emulator that aims to Ghostty is a cross-platform, GPU-accelerated terminal emulator that aims to
push the boundaries of what is possible with a terminal emulator by exposing push the boundaries of what is possible with a terminal emulator by exposing
modern, opt-in features that enable CLI tool developers to build more feature modern, opt-in features that enable CLI tool developers to build more feature
rich, interactive applications. rich, interactive applications.
There are a number of excellent terminal emulator options that exist There are a number of excellent terminal emulator options that exist
today. The unique goal of ghostty is to have a platform for experimenting today. The unique goal of Ghostty is to have a platform for experimenting
with modern, optional, non-standards-compliant features to enhance the with modern, optional, non-standards-compliant features to enhance the
capabilities of CLI applications. We aim to be the best in this category, capabilities of CLI applications. We aim to be the best in this category,
and competitive in the rest. and competitive in the rest.
While aiming for this ambitious goal, ghostty is a fully standards compliant While aiming for this ambitious goal, Ghostty is a fully standards compliant
terminal emulator that aims to remain compatible with all existing shells terminal emulator that aims to remain compatible with all existing shells
and software. You can use this as a drop-in replacement for your existing and software. You can use this as a drop-in replacement for your existing
terminal emulator. terminal emulator.
**Project Status:** Beta. Ghostty implements most of the baseline features **Project Status:** Ghostty is still in beta but implements most of the
you'd expect for a terminal you can work in every day. We're still missing features you'd expect for a daily driver. We currently have hundreds of active
things, but I've been using it full time since April 2022. beta users using Ghostty as their primary terminal. See more in
[Roadmap and Status](#roadmap-and-status).
## Download ## Download
@ -98,10 +99,12 @@ palette = 7=#a89984
palette = 15=#fbf1c7 palette = 15=#fbf1c7
``` ```
The available keys and valid values are not easily documented yet, but they While the set of config keys and values are not yet documented, they are
are easily visible if you're mildly comfortable with Zig. The available keys discoverable in the [Config structure](https://github.com/mitchellh/ghostty/blob/main/src/config/Config.zig).
are just the keys (verbatim) in the [Config structure](https://github.com/mitchellh/ghostty/blob/main/src/config/Config.zig). The available keys are the keys verbatim, and their possible values are typically
The keys are documented there, too. 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.
#### Configuration Errors #### Configuration Errors
@ -323,16 +326,18 @@ a work-in-progress. Similar improvements will follow with Linux.
## Developing Ghostty ## Developing Ghostty
Ghostty is built using both the [Zig](https://ziglang.org/) programming To build Ghostty, you only need [Zig](https://ziglang.org/) installed.
language as well as the Zig build system. At a minimum, Zig and Git must be installed.
For [Nix](https://nixos.org/) users, a `shell.nix` is available which includes The official development environment is defined by Nix. You do not need
all the necessary dependencies pinned to exact versions. to use Nix to develop Ghostty, but the Nix environment is the environment
which runs CI tests and builds release artifacts. Any development work on
Ghostty must pass within these Nix environments.
**Note: Zig nightly is required.** Ghostty is built against the nightly **Note: Zig nightly is required.** Ghostty is built against the nightly
releases of Zig. I plan on stabilizing on a release version when I get releases of Zig while it is still in beta. I plan on stabilizing on a release
closer to generally releasing this to ease downstream packagers. During version when I get closer to generally releasing this to ease downstream
development, I'm sticking to nightly Zig. You can find binary releases of nightly builds packagers. You can find binary releases of nightly builds on the
on the [Zig downloads page](https://ziglang.org/download/). [Zig downloads page](https://ziglang.org/download/).
With Zig installed, a binary can be built using `zig build`: With Zig installed, a binary can be built using `zig build`:
@ -360,7 +365,7 @@ Other useful commands:
- `zig build run -Dconformance=<name>` runs a conformance test case from - `zig build run -Dconformance=<name>` runs a conformance test case from
the `conformance` directory. The `name` is the name of the file. This runs the `conformance` directory. The `name` is the name of the file. This runs
in the current running terminal emulator so if you want to check the in the current running terminal emulator so if you want to check the
behavior of this project, you must run this command in ghostty. behavior of this project, you must run this command in Ghostty.
### Compiling a Release Build ### Compiling a Release Build
@ -460,9 +465,7 @@ modifying anything Prettier will lint, you may want to install it locally and
run this from the repo root before you commit: run this from the repo root before you commit:
``` ```
npm install -g prettier
prettier --write . prettier --write .
``` ```
Or simply install one of the many Prettier extensions out there for your Make sure your Prettier version matches the version of in [devshell.nix](https://github.com/mitchellh/ghostty/blob/main/nix/devshell.nix).
editor of choice.