mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-17 17:26:09 +03:00
apprt/embedded: set wait-after-command when command is set
This commit is contained in:
@ -258,7 +258,9 @@ pub const Surface = struct {
|
|||||||
/// The working directory to load into.
|
/// The working directory to load into.
|
||||||
working_directory: [*:0]const u8 = "",
|
working_directory: [*:0]const u8 = "",
|
||||||
|
|
||||||
/// The command to run in the new surface.
|
/// The command to run in the new surface. If this is set then
|
||||||
|
/// the "wait-after-command" option is also automatically set to true,
|
||||||
|
/// since this is used for scripting.
|
||||||
command: [*:0]const u8 = "",
|
command: [*:0]const u8 = "",
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -334,10 +336,10 @@ pub const Surface = struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If we have a command from the options then we set it.
|
// If we have a command from the options then we set it.
|
||||||
const cm = std.mem.sliceTo(opts.command, 0);
|
const cmd = std.mem.sliceTo(opts.command, 0);
|
||||||
if (cm.len > 0) {
|
if (cmd.len > 0) {
|
||||||
// TODO: Maybe add some validation to this, like the working directory has?
|
config.command = cmd;
|
||||||
config.command = cm;
|
config.@"wait-after-command" = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize our surface right away. We're given a view that is
|
// Initialize our surface right away. We're given a view that is
|
||||||
|
Reference in New Issue
Block a user