mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-21 12:42:25 +00:00
hints kitten: Allow passing extra CLI args when using --customize-procesing
This commit is contained in:
parent
4ade6587e8
commit
432d0f3318
2 changed files with 12 additions and 11 deletions
|
|
@ -38,9 +38,10 @@ contents:
|
|||
|
||||
import re
|
||||
|
||||
def mark(text, args, Mark, *a):
|
||||
def mark(text, args, Mark, extra_cli_args, *a):
|
||||
# This function is responsible for finding all
|
||||
# matching text.
|
||||
# matching text. extra_cli_args are any extra arguments
|
||||
# passed on the command line when invoking the kitten.
|
||||
# We mark all individual word for potential selection
|
||||
for idx, m in enumerate(re.finditer(r'\w+', text)):
|
||||
start, end = m.span()
|
||||
|
|
@ -50,7 +51,7 @@ contents:
|
|||
yield Mark(idx, start, end, mark_text, {})
|
||||
|
||||
|
||||
def handle_result(args, data, target_window_id, boss):
|
||||
def handle_result(args, data, target_window_id, boss, extra_cli_args, *a):
|
||||
# This function is responsible for performing some
|
||||
# action on the selected text.
|
||||
# matches is a list of the selected entries and groupdicts contains
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue