.. program:: kitty +kitten hints


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

  kitty +kitten hints [options] 

Select text from the screen using the keyboard. Defaults to searching for URLs.

Options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. option:: --program <PROGRAM>

    What program to use to open matched text. Defaults to the default open program for the operating system. Use a value of :file:`-` to paste the match into the terminal window instead. A value of :file:`@` will copy the match to the clipboard. A value of :file:`*` will copy the match to the primary selection (on systems that support primary selections). A value of :file:`default` will run the default open program. Can be specified multiple times to run multiple programs.

.. option:: --type <TYPE>

    The type of text to search for. A value of :code:`linenum` is special, it looks for error messages using the pattern specified with :option:`--regex`, which must have the named groups, :code:`path` and :code:`line`. If not specified, will look for :code:`path:line`. The :option:`--linenum-action` option controls where to display the selected error message, other options are ignored.
    Default: :code:`url`
    Choices: :code:`hash, hyperlink, ip, line, linenum, path, regex, url, word`

.. option:: --regex <REGEX>

    The regular expression to use when :option:`kitty +kitten hints --type`:code:`=regex`. The regular expression is in python syntax. If you specify a numbered group in the regular expression only the group will be matched. This allow you to match text ignoring a prefix/suffix, as needed. The default expression matches lines. To match text over multiple lines you should prefix the regular expression with :code:`(?ms)`, which turns on MULTILINE and DOTALL modes for the regex engine. If you specify named groups and a :option:`kitty +kitten hints --program` then the program will be passed arguments corresponding to each named group of the form key=value.
    Default: :code:`(?m)^\s*(.+)\s*$`

.. option:: --linenum-action <LINENUM_ACTION>

    Where to perform the action on matched errors. :code:`self` means the current window, :code:`window` a new kitty window, :code:`tab` a new tab, :code:`os_window` a new OS window and :code:`background` run in the background. The action to perform on the matched errors. The actual action is whatever arguments are provided to the kitten, for example: :code:`kitty + kitten hints --type=linenum --linenum-action=tab vim +{line} {path}` will open the matched path at the matched line number in vim in a new kitty tab.
    Default: :code:`self`
    Choices: :code:`background, os_window, self, tab, window`

.. option:: --url-prefixes <URL_PREFIXES>

    Comma separated list of recognized URL prefixes. Defaults, to the list of prefixes defined in kitty.conf.
    Default: :code:`default`

.. option:: --word-characters <WORD_CHARACTERS>

    Characters to consider as part of a word. In addition, all characters marked as alphanumeric in the unicode database will be considered as word characters. Defaults to the select_by_word_characters setting from kitty.conf.

.. option:: --minimum-match-length <MINIMUM_MATCH_LENGTH>

    The minimum number of characters to consider a match.
    Default: :code:`3`

.. option:: --multiple

    Select multiple matches and perform the action on all of them together at the end. In this mode, press :kbd:`Esc` to finish selecting.

.. option:: --multiple-joiner <MULTIPLE_JOINER>

    String to use to join multiple selections when copying to the clipboard or inserting into the terminal. The special strings: "space", "newline", "empty", "json" and "auto" are interpreted as a space character, a newline an empty joiner, a JSON serialized list and an automatic choice, based on the type of text being selected. In addition, integers are interpreted as zero-based indices into the list of selections. You can use 0 for the first selection and -1 for the last.
    Default: :code:`auto`

.. option:: --add-trailing-space <ADD_TRAILING_SPACE>

    Add trailing space after matched text. Defaults to auto, which adds the space when used together with --multiple.
    Default: :code:`auto`
    Choices: :code:`always, auto, never`

.. option:: --hints-offset <HINTS_OFFSET>

    The offset (from zero) at which to start hint numbering. Note that only numbers greater than or equal to zero are respected.
    Default: :code:`1`

.. option:: --alphabet <ALPHABET>

    The list of characters to use for hints. The default is to use numbers and lowercase English alphabets. Specify your preference as a string of characters. Note that unless you specify the hints offset as zero the first match will be highlighted with the second character you specify.

.. option:: --ascending

    Have the hints increase from top to bottom instead of decreasing from top to bottom.

.. option:: --hints-foreground-color <HINTS_FOREGROUND_COLOR>

    The foreground color for hints
    Default: :code:`black`

.. option:: --hints-background-color <HINTS_BACKGROUND_COLOR>

    The background color for hints
    Default: :code:`green`

.. option:: --hints-text-color <HINTS_TEXT_COLOR>

    The foreground color for text pointed to by the hints
    Default: :code:`gray`

.. option:: --customize-processing <CUSTOMIZE_PROCESSING>

    Name of a python file in the kitty config directory which will be imported to provide custom implementations for pattern finding and performing actions on selected matches. See https://sw.kovidgoyal.net/kitty/kittens/hints.html for details. You can also specify absolute paths to load the script from elsewhere.

.. option:: --window-title <WINDOW_TITLE>

    The window title for the hints window, default title is selected based on the type of text being hinted.

