mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-09-29 14:38:35 +00:00
macos: support configuration via CLI arguments
This makes it so `zig build run` can take arguments such as `--config-default-files=false` or any other configuration. Previously, it only accepted commands such as `+version`. Incidentally, this also makes it so that the app in general can now take configuration arguments via the CLI if it is launched as a new instance via `open`. For example: open -n Ghostty.app --args --config-default-files=false This previously didn't work. This is kind of cool. To make this work, the libghostty C API was modified so that initialization requires the CLI args, and there is a new C API to try to execute an action if it was set.
This commit is contained in:
@@ -45,12 +45,6 @@ extension Ghostty {
|
||||
}
|
||||
|
||||
init() {
|
||||
// Initialize ghostty global state. This happens once per process.
|
||||
if ghostty_init() != GHOSTTY_SUCCESS {
|
||||
logger.critical("ghostty_init failed, weird things may happen")
|
||||
readiness = .error
|
||||
}
|
||||
|
||||
// Initialize the global configuration.
|
||||
self.config = Config()
|
||||
if self.config.config == nil {
|
||||
|
Reference in New Issue
Block a user