From cfc5a952f82b8e7ddd1354ab01f2a1279e30020b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 8 Jun 2020 09:16:26 +0530 Subject: [PATCH] Add --no-response to @ last-used-layout --- kitty/rc/last_used_layout.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/kitty/rc/last_used_layout.py b/kitty/rc/last_used_layout.py index fa0d98262..90598b9b2 100644 --- a/kitty/rc/last_used_layout.py +++ b/kitty/rc/last_used_layout.py @@ -27,9 +27,19 @@ class LastUsedLayout(RemoteCommand): options_spec = '''\ --all -a type=bool-set -Change the layout in all tabs.''' + '\n\n\n' + MATCH_TAB_OPTION +Change the layout in all tabs. + + +--no-response +type=bool-set +default=false +Don't wait for a response from kitty. This means that even if no matching tab is found, +the command will exit with a success code. +''' + '\n\n\n' + MATCH_TAB_OPTION def message_to_kitty(self, global_opts: RCOptions, opts: 'CLIOptions', args: ArgsType) -> PayloadType: + if opts.no_response: + global_opts.no_command_response = True return {'match': opts.match, 'all': opts.all} def response_from_kitty(self, boss: Boss, window: Optional[Window], payload_get: PayloadGetType) -> ResponseType: