how to silence remote control close-tab 'No matching tabs for expression' error #5406
Replies: 3 comments 3 replies
-
No there isnt, it should be a simple patch to add a --no-response option
to it, like there is for many other commands, PR is welcome.
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
tg0h
-
On Wed, Aug 24, 2022 at 12:45:35AM -0700, page-down wrote:
When I try to add `--no-response` to some commands, I find that I need to duplicate some boilerplate code, which should be discussed and designed first.
What boilerplate code? IIRC all you need to do is add --no-response to
options_spec, the code in handle_cmd will automatically not return a
response even if the actual command returns a response.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
On Wed, Aug 24, 2022 at 01:48:46AM -0700, page-down wrote:
Yes. I was referring to the duplicate option definitions for the individual remote control commands.
Well not all options can have --no-response, since it makes no sense for
something like get-text or select-window or get-colors or ls. Therefore,
it cant be a global option.
I submitted the PR first and did not include other e.g. global options etc.
Do you think `map f1 remote_control` should no longer show any error messages after using the `--no-response` option?
No I just pushed a different fix for silencing errors from
remote-control mappings.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there any way to silence the error shown if no tabs match my remote control command?
I created a remote control mapping
map ctrl+cmd+w remote_control close-tab --match "not (title:wiki or state:focused)"
to close tabs that match a certain condition.Beta Was this translation helpful? Give feedback.
All reactions