From 8a1571f62c6e2f56f2a78f54e08fc20678824a6f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 29 Nov 2023 21:44:52 +0530 Subject: [PATCH] Add full docs for matching windows/tabs to the remote control page --- docs/conf.py | 12 ++++++++++++ docs/remote-control.rst | 2 ++ 2 files changed, 14 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 2ad9cb66d..cb18d8ac0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -530,6 +530,18 @@ def write_conf_docs(app: Any, all_kitten_names: Iterable[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) + # }}} diff --git a/docs/remote-control.rst b/docs/remote-control.rst index 8f936ec37..0a2f122aa 100644 --- a/docs/remote-control.rst +++ b/docs/remote-control.rst @@ -341,6 +341,8 @@ examples:: not id:1 (id:2 or id:3) and title:something +.. include:: generated/matching.rst + .. toctree:: :hidden: