From 498963fc7cc755bfe27dcb3708c2a6fe66108b1a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 10 Jun 2023 09:43:41 +0530 Subject: [PATCH] Fix example in docs of using call_remote_control Fixes #6353 --- docs/kittens/custom.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/kittens/custom.rst b/docs/kittens/custom.rst index c27880b7a..415268327 100644 --- a/docs/kittens/custom.rst +++ b/docs/kittens/custom.rst @@ -64,8 +64,13 @@ would pass to ``kitty @``. For example: # get the kitty window to which to send text w = boss.window_id_map.get(target_window_id) if w is not None: - boss.call_remote_control(w, ('send-text', 'hello world')) + boss.call_remote_control(w, ('send-text', f'--match=id:{w.id}', 'hello world')) +.. note:: + Inside handle_result() the active window is still the window in which the + kitten was run, therefore when using call_remote_control() be sure to pass + the appropriate option to select the target window, usually ``--match`` as + shown above or ``--self``. Passing arguments to kittens