diff options
Diffstat (limited to 'src/builtins.zig')
| -rw-r--r-- | src/builtins.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/builtins.zig b/src/builtins.zig index 19d16e1e..02787cf5 100644 --- a/src/builtins.zig +++ b/src/builtins.zig @@ -818,9 +818,16 @@ pub const DelBelow = struct { /// A shell in the calling pane's directory, raw from the first frame. On every /// pane's tagline: the fast path from wherever you are to a prompt there. +/// A terminal below the caller in its directory: the configured shell, or +/// the one named, `Tty fish`, as a terminal's own tag word `Tty+fish` says. pub const Tty = struct { + pub const takes_arg = true; pub fn run(c: Ctx) void { exec.spawnTty(c.p, c.id); + const arg = c.arg orelse return; + const pane = c.p.panes[c.p.active] orelse return; + if (!pane.isTerminal() or pane.shell != null) return; + pane.shell = c.p.gpa.dupe(u8, arg) catch return; } }; |
