hints kitten: Allow passing extra CLI args when using --customize-procesing

This commit is contained in:
Kovid Goyal
2019-11-13 17:27:55 +05:30
parent 4ade6587e8
commit 432d0f3318
2 changed files with 12 additions and 11 deletions

View File

@@ -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