Docs: Fix the help text of query_terminal and other minor tweaks

Use --match-tab in broadcast kitten example.
This commit is contained in:
pagedown 2022-04-29 01:30:45 +08:00
parent 2737cb7dd0
commit bb78dc5ccb
No known key found for this signature in database
GPG Key ID: E921CF18AC8FF6EB
4 changed files with 9 additions and 8 deletions

View File

@ -17,7 +17,7 @@ You can use the options described below to control which windows are selected.
For example, only broadcast to other windows in the current tab:: For example, only broadcast to other windows in the current tab::
map f1 launch --allow-remote-control kitty +kitten broadcast --match state:parent_active map f1 launch --allow-remote-control kitty +kitten broadcast --match-tab state:focused
.. program:: kitty +kitten broadcast .. program:: kitty +kitten broadcast

View File

@ -57,7 +57,7 @@ OPTIONS = r'''
default=False default=False
type=bool-set type=bool-set
Output the current contents of the clipboard to STDOUT. Note that by default Output the current contents of the clipboard to STDOUT. Note that by default
kitty will prompt you asking to allow access to the clipboard. Can be controlled kitty will prompt for permission to access the clipboard. Can be controlled
by :opt:`clipboard_control`. by :opt:`clipboard_control`.

View File

@ -37,8 +37,9 @@ opt('num_context_lines', '3',
opt('diff_cmd', 'auto', opt('diff_cmd', 'auto',
long_text=''' long_text='''
The diff command to use. Must contain the placeholder :code:`_CONTEXT_` which The diff command to use. Must contain the placeholder :code:`_CONTEXT_` which
will be replaced by the number of lines of context. The default is to search the will be replaced by the number of lines of context. The default special value
system for either :program:`git` or :program:`diff` and use that, if found. :code:`auto` is to search the system for either :program:`git` or
:program:`diff` and use that, if found.
''' '''
) )

View File

@ -86,7 +86,7 @@ class TerminalVersion(Query):
@query @query
class AllowHyperlinks(Query): class AllowHyperlinks(Query):
name: str = 'allow_hyperlinks' name: str = 'allow_hyperlinks'
help_text: str = 'The :opt:`setting <allow_hyperlinks>` for allowing hyperlinks can be :code:`yes`, :code:`no` or :code:`ask`' help_text: str = 'The config option :opt:`allow_hyperlinks` in :file:`kitty.conf` for allowing hyperlinks can be :code:`yes`, :code:`no` or :code:`ask`'
@staticmethod @staticmethod
def get_result(opts: Options) -> str: def get_result(opts: Options) -> str:
@ -208,10 +208,10 @@ the :code:`--wait-for` option.
The output is lines of the form:: The output is lines of the form::
:italic:`query`: :italic:`data` query: data
If a particular query is unsupported by the running kitty version, the data will If a particular :italic:`query` is unsupported by the running kitty version, the
be blank. :italic:`data` will be blank.
Note that when calling this from another program, be very careful not to perform Note that when calling this from another program, be very careful not to perform
any I/O on the terminal device until thos kitten exits. any I/O on the terminal device until thos kitten exits.