mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-23 08:47:47 +02:00
Allow using @selection in the launch cmdline
This commit is contained in:
@@ -164,7 +164,14 @@ def launch(boss, opts, args):
|
||||
if opts.copy_cmdline and active_child:
|
||||
cmd = active_child.foreground_cmdline
|
||||
if cmd:
|
||||
kw['cmd'] = cmd
|
||||
final_cmd = []
|
||||
for x in cmd:
|
||||
if x == '@selection' and active and not opts.copy_cmdline:
|
||||
s = boss.data_for_at(active, x)
|
||||
if s:
|
||||
x = s
|
||||
final_cmd.append(x)
|
||||
kw['cmd'] = final_cmd
|
||||
if opts.type == 'overlay' and active and not active.overlay_window_id:
|
||||
kw['overlay_for'] = active.id
|
||||
if opts.stdin_source:
|
||||
|
||||
Reference in New Issue
Block a user