Respect --no-response in the kitty shell

This commit is contained in:
Kovid Goyal 2021-11-04 19:07:07 +05:30
parent 2df6f9cdda
commit 119841a2c4
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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'])