mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-25 13:16:11 +03:00
capture inside of switch, and check if it is empty for some reason
This commit is contained in:
@ -679,14 +679,16 @@ pub fn init(
|
|||||||
switch (initial_command) {
|
switch (initial_command) {
|
||||||
// If a user specifies a command with `-e` it is appropriate to set the title
|
// If a user specifies a command with `-e` it is appropriate to set the title
|
||||||
// as argv[0]
|
// as argv[0]
|
||||||
.direct => {
|
.direct => |cmd| {
|
||||||
_ = try rt_app.performAction(
|
if (cmd.len != 0) {
|
||||||
.{ .surface = self },
|
_ = try rt_app.performAction(
|
||||||
.set_title,
|
.{ .surface = self },
|
||||||
.{ .title = initial_command.direct[0] },
|
.set_title,
|
||||||
);
|
.{ .title = cmd[0] },
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// we won't set the title in the case the shell expands the command
|
// We won't set the title in the case the shell expands the command
|
||||||
// as that should typically be used to launch a shell which should
|
// as that should typically be used to launch a shell which should
|
||||||
// set its own titles
|
// set its own titles
|
||||||
.shell => {},
|
.shell => {},
|
||||||
|
Reference in New Issue
Block a user