From 119841a2c4f2cda4736771a1f92f5399569d0c80 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 4 Nov 2021 19:07:07 +0530 Subject: [PATCH] Respect --no-response in the kitty shell --- kitty/shell.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kitty/shell.py b/kitty/shell.py index 30b7f7e42..99cff4eb5 100644 --- a/kitty/shell.py +++ b/kitty/shell.py @@ -145,11 +145,14 @@ def run_cmd(global_opts: RCOptions, cmd: str, func: RemoteCommand, opts: Any, it from .remote_control import create_basic_command, do_io print(end=set_window_title(cmd) + output_prefix, flush=True) payload = func.message_to_kitty(global_opts, opts, items) - send = create_basic_command(cmd, payload=payload, is_asynchronous=func.is_asynchronous) + no_response = func.no_response + if hasattr(opts, 'no_response'): + no_response = opts.no_response + send = create_basic_command(cmd, payload=payload, is_asynchronous=func.is_asynchronous, no_response=no_response) response_timeout = func.response_timeout if hasattr(opts, 'response_timeout'): response_timeout = opts.response_timeout - response = do_io(global_opts.to, send, func.no_response, response_timeout) + response = do_io(global_opts.to, send, no_response, response_timeout) if not response.get('ok'): if response.get('tb'): print_err(response['tb'])