.. program:: kitty +kitten query_terminal


.. highlight:: sh
.. code-block:: sh

  kitty +kitten query_terminal [options] [query1 query2 ...]

Query the terminal this kitten is run in for various
capabilities. This sends escape codes to the terminal
and based on its response prints out data about supported
capabilities. Note that this is a blocking operation, since
it has to wait for a response from the terminal. You can control
the maximum wait time via the ``--wait-for`` option.

The output is lines of the form::

  query: data

If a particular query is unsupported by the running kitty version,
the data will be blank.

Note that when calling this from another program, be very
careful not to perform any I/O on the terminal device
until the kitten exits.

Available queries are::

  name: Terminal name (xterm-kitty)
  version: Terminal version, for e.g.: 0.19.2
  allow_hyperlinks: yes, no or ask


Options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. option:: --wait-for <WAIT_FOR>

    The amount of time (in seconds) to wait for a response from the terminal, after querying it.
    Default: :code:`10`

