Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kitten hints doesn't correctly process multiline strings #3845

Closed
nikitabobko opened this issue Jul 19, 2021 · 1 comment
Closed

kitten hints doesn't correctly process multiline strings #3845

nikitabobko opened this issue Jul 19, 2021 · 1 comment
Labels

Comments

@nikitabobko
Copy link

To Reproduce
Steps to reproduce the behavior:

  1. Bind kitten hints --type path hotkey. Example: map ctrl+alt+p kitten hints --type path --program -
  2. Make your terminal print some path which is very long to fit into one line. Example: echo this/is/very/very/very/very/very/very/very/very/very/very/very/very/very/very/very/very/very/very/very/very/long/path
  3. Fire up kitten hints --type path command
    EXP: the whole path is inserted into the terminal
    ACT: Only first line of path is inserted into the terminal

Environment details

kitty 0.20.2 created by Kovid Goyal
Linux NVC00112 5.4.98-1-lts #1 SMP Sat, 13 Feb 2021 19:22:14 +0000 x86_64
Arch Linux \r (\l)
Loaded config files: /home/bobko/.config/kitty/kitty.conf
Running under: X11

Config options different from defaults:
active_tab_background      Color(red=255, green=255, blue=255)
allow_remote_control       y
background                 Color(red=255, green=255, blue=255)
bold_font                  JetBrains Mono Bold
bold_italic_font           JetBrains Mono Bold Italic
cursor                     Color(red=78, green=154, blue=6)
cursor_blink_interval      0.0
cursor_shape               2
disable_ligatures          2
enable_audio_bell          False
enabled_layouts            ['splits']
font_family                JetBrains Mono
foreground                 Color(red=0, green=0, blue=0)
italic_font                JetBrains Mono Italic
open_url_modifiers         4
rectangle_select_modifiers 3
selection_background       Color(red=47, green=91, blue=237)
selection_foreground       Color(red=255, green=255, blue=255)
tab_bar_edge               1
tab_bar_style              separator
tab_separator              │
wheel_scroll_multiplier    3.0
Added shortcuts:
	 alt+- KeyAction(func='launch', args=['--cwd=current', '--location=hsplit'])
	 alt+\ KeyAction(func='launch', args=['--cwd=current', '--location=vsplit'])
	 alt+i KeyAction(func='neighboring_window', args=['top'])
	 alt+j KeyAction(func='neighboring_window', args=['left'])
	 alt+k KeyAction(func='neighboring_window', args=['bottom'])
	 alt+l KeyAction(func='neighboring_window', args=['right'])
	 alt+left KeyAction(func='neighboring_window', args=['left'])
	 alt+right KeyAction(func='neighboring_window', args=['right'])
	 alt+up KeyAction(func='neighboring_window', args=['top'])
	 alt+down KeyAction(func='neighboring_window', args=['bottom'])
	 shift+alt+i KeyAction(func='move_window', args=['top'])
	 shift+alt+j KeyAction(func='move_window', args=['left'])
	 shift+alt+k KeyAction(func='move_window', args=['bottom'])
	 shift+alt+l KeyAction(func='move_window', args=['right'])
	 shift+alt+left KeyAction(func='move_window', args=['left'])
	 shift+alt+right KeyAction(func='move_window', args=['right'])
	 shift+alt+up KeyAction(func='move_window', args=['top'])
	 shift+alt+down KeyAction(func='move_window', args=['bottom'])
	 ctrl+c KeyAction(func='combine', args=(KeyAction(func='copy_to_clipboard', args=()), KeyAction(func='send_text', args=['all', b'\x03'])))
	 ctrl+n KeyAction(func='new_os_window', args=())
	 ctrl+t KeyAction(func='new_tab', args=())
	 ctrl+v KeyAction(func='paste_from_clipboard', args=())
	 ctrl+tab KeyAction(func='next_tab', args=())
	 ctrl+up KeyAction(func='scroll_line_up', args=())
	 ctrl+down KeyAction(func='scroll_line_down', args=())
	 ctrl+f1 KeyAction(func='launch', args=['--stdin-source=@screen_scrollback', 'micro'])
	 shift+ctrl+tab KeyAction(func='previous_tab', args=())
	 alt+ctrl+h KeyAction(func='kitten', args=['hints', '--type hash --program - --alphabet fjasdklgh --hints-text-color black'])
	 alt+ctrl+p KeyAction(func='kitten', args=['hints', '--type path --program - --alphabet fjasdklgh --hints-text-color black'])
	 alt+ctrl+left KeyAction(func='resize_window', args=['narrower', 1])
	 alt+ctrl+right KeyAction(func='resize_window', args=['wider', 1])
	 alt+ctrl+up KeyAction(func='resize_window', args=['shorter', 1])
	 alt+ctrl+down KeyAction(func='resize_window', args=['taller', 1])
Removed shortcuts:
	 shift+insert KeyAction(func='paste_from_selection', args=())
	 shift+ctrl++ KeyAction(func='change_font_size', args=(True, '+', 2.0))
	 shift+ctrl+, KeyAction(func='move_tab_backward', args=())
	 shift+ctrl+- KeyAction(func='change_font_size', args=(True, '-', 2.0))
	 shift+ctrl+. KeyAction(func='move_tab_forward', args=())
	 shift+ctrl+0 KeyAction(func='tenth_window', args=())
	 shift+ctrl+1 KeyAction(func='first_window', args=())
	 shift+ctrl+2 KeyAction(func='second_window', args=())
	 shift+ctrl+3 KeyAction(func='third_window', args=())
	 shift+ctrl+4 KeyAction(func='fourth_window', args=())
	 shift+ctrl+5 KeyAction(func='fifth_window', args=())
	 shift+ctrl+6 KeyAction(func='sixth_window', args=())
	 shift+ctrl+7 KeyAction(func='seventh_window', args=())
	 shift+ctrl+8 KeyAction(func='eighth_window', args=())
	 shift+ctrl+9 KeyAction(func='ninth_window', args=())
	 shift+ctrl+= KeyAction(func='change_font_size', args=(True, '+', 2.0))
	 shift+ctrl+[ KeyAction(func='previous_window', args=())
	 shift+ctrl+] KeyAction(func='next_window', args=())
	 shift+ctrl+` KeyAction(func='move_window_to_top', args=())
	 shift+ctrl+a > 1 KeyAction(func='set_background_opacity', args=['1'])
	 shift+ctrl+a > d KeyAction(func='set_background_opacity', args=['default'])
	 shift+ctrl+a > l KeyAction(func='set_background_opacity', args=['-0.1'])
	 shift+ctrl+a > m KeyAction(func='set_background_opacity', args=['+0.1'])
	 shift+ctrl+b KeyAction(func='move_window_backward', args=())
	 shift+ctrl+c KeyAction(func='copy_to_clipboard', args=())
	 shift+ctrl+e KeyAction(func='kitten', args=['hints'])
	 shift+ctrl+f KeyAction(func='move_window_forward', args=())
	 shift+ctrl+h KeyAction(func='show_scrollback', args=())
	 shift+ctrl+j KeyAction(func='scroll_line_down', args=())
	 shift+ctrl+k KeyAction(func='scroll_line_up', args=())
	 shift+ctrl+l KeyAction(func='next_layout', args=())
	 shift+ctrl+n KeyAction(func='new_os_window', args=())
	 shift+ctrl+o KeyAction(func='pass_selection_to_program', args=())
	 shift+ctrl+p > f KeyAction(func='kitten', args=['hints', '--type path --program -'])
	 shift+ctrl+p > h KeyAction(func='kitten', args=['hints', '--type hash --program -'])
	 shift+ctrl+p > l KeyAction(func='kitten', args=['hints', '--type line --program -'])
	 shift+ctrl+p > n KeyAction(func='kitten', args=['hints', '--type linenum'])
	 shift+ctrl+p > w KeyAction(func='kitten', args=['hints', '--type word --program -'])
	 shift+ctrl+p > y KeyAction(func='kitten', args=['hints', '--type hyperlink'])
	 shift+ctrl+p > shift+f KeyAction(func='kitten', args=['hints', '--type path'])
	 shift+ctrl+r KeyAction(func='start_resizing_window', args=())
	 shift+ctrl+s KeyAction(func='paste_from_selection', args=())
	 shift+ctrl+t KeyAction(func='new_tab', args=())
	 shift+ctrl+u KeyAction(func='kitten', args=['unicode_input'])
	 shift+ctrl+v KeyAction(func='paste_from_clipboard', args=())
	 shift+ctrl+escape KeyAction(func='kitty_shell', args=['window'])
	 shift+ctrl+enter KeyAction(func='new_window', args=())
	 shift+ctrl+backspace KeyAction(func='change_font_size', args=(True, None, 0.0))
	 shift+ctrl+delete KeyAction(func='clear_terminal', args=['reset', True])
	 shift+ctrl+left KeyAction(func='previous_tab', args=())
	 shift+ctrl+right KeyAction(func='next_tab', args=())
	 shift+ctrl+up KeyAction(func='scroll_line_up', args=())
	 shift+ctrl+down KeyAction(func='scroll_line_down', args=())
	 shift+ctrl+page_up KeyAction(func='scroll_page_up', args=())
	 shift+ctrl+page_down KeyAction(func='scroll_page_down', args=())
	 shift+ctrl+home KeyAction(func='scroll_home', args=())
	 shift+ctrl+end KeyAction(func='scroll_end', args=())
	 shift+ctrl+f2 KeyAction(func='edit_config_file', args=())
	 shift+ctrl+f10 KeyAction(func='toggle_maximized', args=())
	 shift+ctrl+f11 KeyAction(func='toggle_fullscreen', args=())
	 shift+ctrl+kp_subtract KeyAction(func='change_font_size', args=(True, '-', 2.0))
	 shift+ctrl+kp_add KeyAction(func='change_font_size', args=(True, '+', 2.0))
	 shift+alt+ctrl+t KeyAction(func='set_tab_title', args=())
Changed shortcuts:
	 shift+ctrl+q KeyAction(func='close_window', args=())
	 shift+ctrl+w KeyAction(func='close_tab', args=())
@nikitabobko
Copy link
Author

Same with hashes: kitten hints --type hash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant