mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-19 05:50:27 +00:00
Add .ghostty extension to config (#8885)
Resolves #8689 For various reason, ghostty wants to have a unique file extension for the config files. The name was settled on `config.ghostty`. This will help with tooling. See #8438 (original discussion) for more details. This PR introduces the preferred default of `.ghostty` while still supporting the previous `config` file. If both files exist, a warning log is sent. The docs / website will need to be updated to reflect this change. > [!NOTE] > Only tested on macOS 26.0. --------- Co-authored-by: Mitchell Hashimoto <m@mitchellh.com>
This commit is contained in:
@@ -30,9 +30,9 @@ pub const Options = struct {
|
||||
/// this yet.
|
||||
///
|
||||
/// The filepath opened is the default user-specific configuration
|
||||
/// file, which is typically located at `$XDG_CONFIG_HOME/ghostty/config`.
|
||||
/// file, which is typically located at `$XDG_CONFIG_HOME/ghostty/config.ghostty`.
|
||||
/// On macOS, this may also be located at
|
||||
/// `~/Library/Application Support/com.mitchellh.ghostty/config`.
|
||||
/// `~/Library/Application Support/com.mitchellh.ghostty/config.ghostty`.
|
||||
/// On macOS, whichever path exists and is non-empty will be prioritized,
|
||||
/// prioritizing the Application Support directory if neither are
|
||||
/// non-empty.
|
||||
@@ -73,7 +73,7 @@ fn runInner(alloc: Allocator, stderr: *std.Io.Writer) !u8 {
|
||||
defer config.deinit();
|
||||
|
||||
// Find the preferred path.
|
||||
const path = try Config.preferredDefaultFilePath(alloc);
|
||||
const path = try configpkg.preferredDefaultFilePath(alloc);
|
||||
defer alloc.free(path);
|
||||
|
||||
// We don't currently support Windows because we use the exec syscall.
|
||||
|
||||
Reference in New Issue
Block a user