kitten hints [options]
Select text from the screen using the keyboard. Defaults to searching for URLs.
Options--program<PROGRAM>
What program to use to open matched text. Defaults to the default open program for the operating
system. Various special values are supported:
- paste the match into the terminal window.
@ copy the match to the clipboard
* copy the match to the primary selection (on systems that support primary selections)
@NAME copy the match to the specified buffer, e.g. @adefault
run the default open program. Note that when using the hyperlink --type the default is to
use the kitty hyperlinkhandling facilities.
launch run Thelaunchcommand to open the program in a new kitty tab, window, overlay, etc. For
example:
--program "launch --type=tab vim"
Can be specified multiple times to run multiple programs.
--type<TYPE>
The type of text to search for. A value of linenum is special, it looks for error messages using
the pattern specified with --regex, which must have the named groups: path and line. If not
specified, will look for path:line. The --linenum-action option controls where to display the
selected error message, other options are ignored. Default: url Choices: hash, hyperlink, ip,
line, linenum, path, regex, url, word--regex<REGEX>
The regular expression to use when option --type is set to regex, in Perl 5 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, things get a little tricky, as line endings are a sequence of zero or
more null bytes followed by either a carriage return or a newline character. To have a pattern
match over line endings you will need to match the character set [\0\r\n]. The newlines and null
bytes are automatically stripped from the returned text. If you specify named groups and a
--program, then the program will be passed arguments corresponding to each named group of the form
key=value. Default: (?m)^s*(.+)s*$--linenum-action<LINENUM_ACTION>
Where to perform the action on matched errors. self means the current window, window a new kitty
window, tab a new tab, os_window a new OS window and background run in the background. The actual
action is whatever arguments are provided to the kitten, for example: kittenhints--type=linenum--linenum-action=tabvim+{line}{path} will open the matched path at the matched line number in
vim in a new kitty tab. Note that in order to use --program to copy or paste the provided
arguments, you need to use the special value self. Default: self Choices: background, os_window,
self, tab, window--url-prefixes<URL_PREFIXES>
Comma separated list of recognized URL prefixes. Defaults to the list of prefixes defined by the
url_prefixes option in kitty.conf. Default: default--url-excluded-characters<URL_EXCLUDED_CHARACTERS>
Characters to exclude when matching URLs. Defaults to the list of characters defined by the
url_excluded_characters option in kitty.conf. The syntax for this option is the same as for
url_excluded_characters. Default: default--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 option from kitty.conf.
--minimum-match-length<MINIMUM_MATCH_LENGTH>
The minimum number of characters to consider a match. Default: 3--multiple
Select multiple matches and perform the action on all of them together at the end. In this mode,
press Esc to finish selecting.
--multiple-joiner<MULTIPLE_JOINER>
String for joining multiple selections when copying to the clipboard or inserting into the
terminal. The special values are: space - a space character, newline - a newline, empty - an empty
joiner, json - a JSON serialized list, auto - 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: auto--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: auto Choices: always, auto, never--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: 1--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 you need to specify the
--hints-offset as zero to use the first character to highlight the first match, otherwise it will
start with the second character by default.
--ascending
Make the hints increase from top to bottom, instead of decreasing from top to bottom.
--hints-foreground-color<HINTS_FOREGROUND_COLOR>
The foreground color for hints. You can use color names or hex values. For the eight basic named
terminal colors you can also use the bright- prefix to get the bright variant of the color.
Default: black--hints-background-color<HINTS_BACKGROUND_COLOR>
The background color for hints. You can use color names or hex values. For the eight basic named
terminal colors you can also use the bright- prefix to get the bright variant of the color.
Default: green--hints-text-color<HINTS_TEXT_COLOR>
The foreground color for text pointed to by the hints. You can use color names or hex values. For
the eight basic named terminal colors you can also use the bright- prefix to get the bright
variant of the color. The default is to pick a suitable color automatically. Default: auto--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. You can also
specify absolute paths to load the script from elsewhere. See ‐
https://sw.kovidgoyal.net/kitty/kittens/hints/ for details.
--window-title<WINDOW_TITLE>
The title for the hints window, default title is based on the type of text being hinted.
NOTE:
To avoid having to specify the same command line options on every invocation, you can use the
action_alias option in kitty.conf, creating aliases that have common sets of options. For example:
action_alias myhints kitten hints --alphabet qfjdkslaureitywovmcxzpq1234567890
map f1 myhints --customize-processing custom-hints.py