k9s icon indicating copy to clipboard operation
k9s copied to clipboard

ZSH: Text selection with a mouse not possbile in Windows Terminal SSH session

Open SSvilen opened this issue 11 months ago • 4 comments




Describe the bug I use Windows Terminal and then go to a Ubuntu jump station via SSH and there I start zsh and afterwards k9s. If I try to select a text with the mouse, it does not work. If I use bash, it works. Uusing MobaXterm it works with both zsh and bash..So it has to do something with Windows Terminal The last version where it worked properly was 0.29.1

To Reproduce Steps to reproduce the behavior:

Try to select any text with the mouse.

Screenshots This is how the normal behavior looks like:

https://github.com/derailed/k9s/assets/10175251/70b47e72-202c-4f49-84c0-da41d04ab99c

This is how it looks like in ssh+zsh in windows terminal:

https://github.com/derailed/k9s/assets/10175251/68443271-752f-4ea5-a0b1-3184e3becfa1

Versions (please complete the following information):

  • OS: [windows 11 + ssh in windows terminal to ubuntu 20.04 + zsh 5.8]
  • K9s: [0.32.4]

SSvilen avatar Mar 22 '24 08:03 SSvilen

You likely have badly setup zsh, so it enables mouse, but doesn't reset before executing commands. When mouse is enabled, terminals usually don't highlight, but send the events to program. Try fixing your zsh setup and meanwhile try holding shift when selecting.

vlada-dudr avatar Apr 04 '24 10:04 vlada-dudr

@vlada-dudr This problem came up only with the newer version of k9s and it happens only with Windows Terminal. Holding shift does help though.

SSvilen avatar Apr 08 '24 09:04 SSvilen

Try to disable mouse reporting with

echo -e "\e[?1000l"

Before launching k9s.

vlada-dudr avatar Apr 08 '24 15:04 vlada-dudr

No luck.

SSvilen avatar Apr 09 '24 14:04 SSvilen