1

I am using fish shell (fish 3.2.2) as my default on ubuntu in wsl2 on my windows laptop. I have also installed oh-my-fish to enable vim keybinds in the terminal (and that is the only config I have added). Without a noticeable pattern, when running the shell in the integrated terminal in vscode, it randomly adds 'l' or 'h' at the end of lines or before lines and adds an escape.

It does not do this in the normal terminal (the new windows terminal nor in the ubuntu window). It only does this if I run the shell in vscode integrated terminal.

example of terminal

Does anyone know why it does this and how to stop it.

Alex Scriba
  • 95
  • 1
  • 8
  • Any chance it is `fish` 3.2.1? I have seen some terminal corruption (in Windows Terminal for me) that I believe started appearing in 3.2.1, but I haven't been able to isolate it yet. – NotTheDr01ds Apr 13 '21 at 14:57
  • There is no such thing as "fish terminal". There is the fish shell which you run inside a terminal if you're using fish interactively. Also, you said "in VSCode" in the question subject line. So it is not clear if you're trying to run fish inside a terminal inside VSCode or something else. – Kurtis Rader Apr 13 '21 at 15:22
  • This may be related to escape sequences to disable mouse tracking. What terminal are you using - are you using the old command prompt, or the new Windows Terminal? – ridiculous_fish Apr 14 '21 at 03:05
  • @KurtisRader My bad, I guess I meant fish shell. The issue only appears when I run teh shell through vscode integrated terminal. When I run it through windows terminal the issue is not present. – Alex Scriba Apr 15 '21 at 06:07
  • @NotTheDr01ds I am using fish 3.2.2. Please let me know if you find a solutions. – Alex Scriba Apr 15 '21 at 06:09
  • @ridiculous_fish in command prompt and windows terminal, the issue doesn't persists. It only happens when I run fish in vscdoe integrated terminal. – Alex Scriba Apr 15 '21 at 06:10
  • @ridiculous_fish I'm using Windows Terminal, and I can reproduce the issue 100% of the time now using what some would consider a convoluted use-case. It's actually something I was documenting for [this answer](https://askubuntu.com/a/1332723/1165986) earlier today. I have Windows OpenSSH server installed on my Windows machines (two of them). When I `ssh` into Windows, then enter a WSL1 (and only version 1) session using `wsl.exe` where `fish` is my default shell, the extra "l" and "h" characters appear frequently. – NotTheDr01ds Apr 20 '21 at 22:17
  • 1
    @AlexScriba Are you doubly-certain that your instance is WSL2? Can you confirm with `wsl -l -v`? I only ask because I've seen a lot of people enable WSL2, but the default instances that are created are still WSL1 until they either (a) convert them with `wsl --set-version 2`, or (b) create new instances after setting `wsl --set-default-version 2`. I'm only able to get the problem to occur under WSL1. When I convert a WSL1 instance to WSL2, the problem goes away. Convert it back to WSL1, and the problem reappears. – NotTheDr01ds Apr 20 '21 at 22:20
  • @NotTheDr01ds Thank you! had a look and turns out it never did switch over to wsl2 and was running in wsl1. Thought I had run that command to switch it but guess I hadn't. Any idea what caused the bug in the first place? – Alex Scriba Apr 21 '21 at 08:54

0 Answers0