mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-17 07:16:12 +00:00
allow configuring shell integration injection
This commit is contained in:
@@ -197,10 +197,32 @@ pub const Config = struct {
|
||||
/// Additional configuration files to read.
|
||||
@"config-file": RepeatableString = .{},
|
||||
|
||||
// Confirms that a surface should be closed before closing it. This defaults
|
||||
// to true. If set to false, surfaces will close without any confirmation.
|
||||
/// Confirms that a surface should be closed before closing it. This defaults
|
||||
/// to true. If set to false, surfaces will close without any confirmation.
|
||||
@"confirm-close-surface": bool = true,
|
||||
|
||||
/// Whether to enable shell integration auto-injection or not. Shell
|
||||
/// integration greatly enhances the terminal experience by enabling
|
||||
/// a number of features:
|
||||
///
|
||||
/// * Working directory reporting so new tabs, splits inherit the
|
||||
/// previous terminal's working directory.
|
||||
/// * Prompt marking that enables the "scroll_to_prompt" keybinding.
|
||||
/// * If you're sitting at a prompt, closing a terminal will not ask
|
||||
/// for confirmation.
|
||||
/// * Resizing the window with a complex prompt usually paints much
|
||||
/// better.
|
||||
///
|
||||
/// Allowable values are:
|
||||
///
|
||||
/// * "none" - Do not do any automatic injection. You can still manually
|
||||
/// configure your shell to enable the integration.
|
||||
/// * "auto" - Detect the shell based on the filename.
|
||||
/// * "fish", "zsh" - Use this specific shell injection scheme.
|
||||
///
|
||||
/// The default value is "auto".
|
||||
@"shell-integration": ShellIntegration = .auto,
|
||||
|
||||
/// This is set by the CLI parser for deinit.
|
||||
_arena: ?ArenaAllocator = null,
|
||||
|
||||
@@ -1209,6 +1231,13 @@ pub const Keybinds = struct {
|
||||
}
|
||||
};
|
||||
|
||||
pub const ShellIntegration = enum {
|
||||
none,
|
||||
auto,
|
||||
fish,
|
||||
zsh,
|
||||
};
|
||||
|
||||
// Wasm API.
|
||||
pub const Wasm = if (!builtin.target.isWasm()) struct {} else struct {
|
||||
const wasm = @import("os/wasm.zig");
|
||||
|
Reference in New Issue
Block a user