Allow the URL hints kitten to insert the selected URL into the terminal
This commit is contained in:
parent
2cf8c6aea7
commit
75b5130d96
@ -212,6 +212,8 @@ OPTIONS = partial('''\
|
||||
default=default
|
||||
What program to use to open matched URLs. Defaults
|
||||
to the default URL open program for the operating system.
|
||||
Use a value of - to paste the URL into the terminal window
|
||||
instead.
|
||||
|
||||
|
||||
--regex
|
||||
@ -239,4 +241,9 @@ def main(args):
|
||||
|
||||
def handle_result(args, data, target_window_id, boss):
|
||||
program = data['program']
|
||||
if program == '-':
|
||||
w = boss.window_id_map.get(target_window_id)
|
||||
if w is not None:
|
||||
w.paste(data['url'])
|
||||
else:
|
||||
boss.open_url(data['url'], None if program == 'default' else program)
|
||||
|
||||
@ -432,9 +432,11 @@ map ctrl+shift+backspace restore_font_size
|
||||
map ctrl+shift+f11 toggle_fullscreen
|
||||
map ctrl+shift+u input_unicode_character
|
||||
map ctrl+shift+f2 edit_config_file
|
||||
# Open a currently visible URL using the keyboard. The program used to open the URL is specified in open_url_with.
|
||||
# You can customize how the URLs are detected and opened by specifying command line options to
|
||||
# url_hints. For example:
|
||||
# Open a currently visible URL using the keyboard. The program used to open the
|
||||
# URL is specified in open_url_with. You can customize how the URLs are
|
||||
# detected and opened by specifying command line options to url_hints. The
|
||||
# special value of - for --program will cause the selected URL to be inserted
|
||||
# into the terminal. For example:
|
||||
# map ctrl+shift+e run_kitten text url_hints --program firefox --regex "http://[^ ]+"
|
||||
map ctrl+shift+e run_kitten text url_hints
|
||||
# Open the kitty shell in a new window/tab/overlay/os_window to control kitty using commands.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user