Kitty: Starship prompt: new prompt lines on paste and other actions

Created on 6 Jun 2020  路  1Comment  路  Source: kovidgoyal/kitty

Describe the bug
I'm using Starship Prompt with fish shell on Mac OS 10.15.5

In the following situations, a new prompt being emitted *where it should not):

  • have text in the prompt line, press escape (vim normal mode)
  • paste something from the clipboard
  • cancel the command (CTRL + C)
  • paste something using a kitten

Bildschirmfoto 2020-06-06 um 17 17 20

I already opened an issue in starship: https://github.com/starship/starship/issues/1271

Since iTerm and Alacritty don't show this behavior, I thought this might have to do with kitty.

Output of kitty --debug-config

kitty 0.17.4 created by Kovid Goyal
Darwin Bastians-MBP.fritz.box 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64
ProductName:    Mac OS X ProductVersion:    10.15.5 BuildVersion:   19F101
Loaded config files: /Users/bastian/.config/kitty/kitty.conf

Config options different from defaults:
active_border_color   Color(red=184, green=186, blue=37)
adjust_line_height    1.2
allow_remote_control  y
background            Color(red=40, green=40, blue=40)
color0                Color(red=40, green=40, blue=40)
color1                Color(red=204, green=36, blue=29)
color10               Color(red=184, green=187, blue=38)
color11               Color(red=250, green=189, blue=45)
color12               Color(red=131, green=165, blue=152)
color13               Color(red=211, green=134, blue=155)
color14               Color(red=142, green=192, blue=124)
color15               Color(red=146, green=131, blue=116)
color2                Color(red=152, green=151, blue=26)
color3                Color(red=215, green=153, blue=33)
color4                Color(red=69, green=133, blue=136)
color5                Color(red=177, green=98, blue=134)
color6                Color(red=104, green=157, blue=106)
color7                Color(red=168, green=153, blue=132)
color8                Color(red=146, green=131, blue=116)
color9                Color(red=251, green=73, blue=52)
cursor                Color(red=146, green=131, blue=116)
disable_ligatures     1
editor                /usr/local/bin/kak
env                   {'LANG': 'de_DE.UTF-8', 'PATH': '/usr/local/bin:/usr/local/sbin:/Applications/kitty.app/Contents/MacOS:/usr/local/sbin:/Users/bastian/.local/bin:/Users/bastian/.cache/dein/repos/github.com/junegunn/fzf/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:/usr/local/MacGPG2/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Library/TeX/texbin:/usr/local/sbin:/Applications/kitty.app/Contents/MacOS'}
font_family           JetBrains Mono
font_size             13.0
foreground            Color(red=235, green=219, blue=178)
macos_option_as_alt   2
macos_titlebar_color  1
mouse_hide_wait       5.0
resize_draw_strategy  3
selection_background  Color(red=60, green=56, blue=54)
selection_foreground  Color(red=146, green=131, blue=116)
strip_trailing_spaces smart
symbol_map            {(57504, 57507): 'JetBrainsMono Nerd Font', (57536, 57543): 'JetBrainsMono Nerd Font'}
tab_bar_style         separator
window_padding_width  FloatEdges(left=3.0, top=3.0, right=3.0, bottom=3.0)
Added shortcuts:
     control+l KeyAction(func='combine', args=(KeyAction(func='clear_terminal', args=['scroll', True]), KeyAction(func='send_text', args=['normal,application', b'\x0c'])))
     super+d KeyAction(func='launch', args=['--location=vsplit'])
     super+left_bracket KeyAction(func='previous_window', args=())
     super+right_bracket KeyAction(func='next_window', args=())
     alt+super+d KeyAction(func='layout_action', args=['rotate', ()])
Changed shortcuts:
     shift+control+enter KeyAction(func='new_window_with_cwd', args=())
     super+enter KeyAction(func='new_window_with_cwd', args=())
     shift+super+d KeyAction(func='launch', args=['--location=hsplit'])
bug

Most helpful comment

Prompts are drawn by shells, not terminals, there is nothing for kitty
to do here. All it can do is draw what characters it receives. Most
likely the issue is caused by some mismatch between what the shell
expects and what the terminal does. Only the shells/prompts developers
can tell you if that is the case, if so let me know and I will let check
if kitty is behaving correctly or not.

>All comments

Prompts are drawn by shells, not terminals, there is nothing for kitty
to do here. All it can do is draw what characters it receives. Most
likely the issue is caused by some mismatch between what the shell
expects and what the terminal does. Only the shells/prompts developers
can tell you if that is the case, if so let me know and I will let check
if kitty is behaving correctly or not.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mihaicristiantanase picture mihaicristiantanase  路  3Comments

JJGO picture JJGO  路  3Comments

Nudin picture Nudin  路  3Comments

keyofnight picture keyofnight  路  3Comments

hdriqi picture hdriqi  路  3Comments