Add full docs for matching windows/tabs to the remote control page

This commit is contained in:
Kovid Goyal 2023-11-29 21:44:52 +05:30
parent 3876d518bd
commit 8a1571f62c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 14 additions and 0 deletions

View File

@ -530,6 +530,18 @@ def generate_default_config(definition: Definition, name: str) -> None:
from kitty.actions import as_rst
with open('generated/actions.rst', 'w', encoding='utf-8') as f:
f.write(as_rst())
from kitty.rc.base import MATCH_TAB_OPTION, MATCH_WINDOW_OPTION
with open('generated/matching.rst', 'w') as f:
print('Matching windows', file=f)
print('______________________________', file=f)
w = 'm' + MATCH_WINDOW_OPTION[MATCH_WINDOW_OPTION.find('Match') + 1:]
print('When matching windows,', w, file=f)
print('Matching tabs', file=f)
print('______________________________', file=f)
w = 'm' + MATCH_TAB_OPTION[MATCH_TAB_OPTION.find('Match') + 1:]
print('When matching tabs,', w, file=f)
# }}}

View File

@ -341,6 +341,8 @@ examples::
not id:1
(id:2 or id:3) and title:something
.. include:: generated/matching.rst
.. toctree::
:hidden: