I wonder if this is a login-related issue? Running Preferences: Open Default Settings (JSON) in the command palette, I see this:

    "terminal.integrated.profiles.linux": {
        ...
        "fish": {
            "path": "fish"
        },
        ...
    },
    ...
    "terminal.integrated.profiles.osx": {
        ...
        "fish": {
            "path": "fish",
            "args": [
                "-l"
            ]
        },
        ...

Notably, the Linux default terminal profile setting doesn't pass -l, but the OSX profile does.

If you're on macOS, then try checking if you've overridden the fish terminal profile in a way that doesn't pass -l.

If you're on Linux and that's the issue, I think you can work around it by just redefining the terminal profile in your user settings.json, adding the -l flag (you can copy from the OSX terminal profile for fish).

Answer from starball on Stack Overflow
🌐
Medium
medium.com › @maheshblog › vs-code-fish-cool-dev-setup-78c90d9e6a23
VS Code + Fish = Cool dev setup. Following dev setup will work in Mac… | by Mahesh G | Medium
August 25, 2020 - Copy following User Settings to configure Visual studio code to use fish shell as default: { // You need to update respective OS setting. Below one is for Ubuntu "terminal.integrated.shell.linux": "/usr/bin/fish" } You are all set for productive dev environment which works for almost any language.
🌐
Reddit
reddit.com › r/fishshell › issue with integrated terminal in vscode
r/fishshell on Reddit: Issue with integrated terminal in VsCode
March 23, 2023 -

Hey everyone!
I'm not a strong fish user, I usually manage my way around but I am feeling stuck right now.

I have been using fish on a linux computer for more than a year, no issues between the "real" terminal and the integrated one in VsCode, the both work fine.

I recently had a Macbook for work and well, I needed to feel at home so I installed fish via homebrew.

I followed the fish instruction to turn fish into my default shell, adapting the path to the homebrew one:

 echo /opt/homebrew/bin/fish | sudo tee -a /etc/shells
 chsh -s /opt/homebrew/bin/fish

Here is what cat /etc/shells gives me:

/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
/opt/homebrew/bin/fish

So we're good here. In the Terminal app settings, I changed "Shells open with" from /bin/zsh to /opt/homebrew/bin/fish. It indeed now launch fish as the default shell but it fails to load things like zoxide or starship which are loaded in the config.fish.

To try to prevent that I added fish_add_path /opt/homebrew/bin/starship before executing the command but to no avail.

My intuition was that some $PATH was not loaded correctly before fish initialization, there is actually a Warning about that on the documentation but let's be honest, I did not fully understood or read through it.

To fix that, I switched back my default shell to /bin/zsh and the first command my terminal automatically execute is: fish. It works wonderfully. Sadly I can't replicate the behaviour for VsCode so I can't hide this issue anymore and need to fix it, any thoughts or experience worth sharing?

Many thanks!

Discussions

In VS Studio Code, the fish terminal does not apply fish config, but outside VS Code, in the classic terminal, the config is well applied - Stack Overflow
In my mac, when I open the classic terminal, the fish terminal is well launched and the config is well applied (with colors, history etc). But when I use the VS code terminal, the fish terminal is More on stackoverflow.com
🌐 stackoverflow.com
Fish shell is not recognized
Does this issue occur when all extensions are disabled?: Yes/No VS Code Version: 1.67.2 OS Version: 13.0 Steps to Reproduce: Going into Settings.json adding fish as profile (if its not there) setti... More on github.com
🌐 github.com
4
June 5, 2022
I installed fish shell on my computer and now I can't open the VS code terminal - Stack Overflow
1 Can't create new integrated terminal(local) for mac on VSCode when connected to remote linux computer with ssh · 519 Change the default terminal in Visual Studio Code · 841 What are the differences between Visual Studio Code and Visual Studio? 2 fish shell: Weird exit command behaviour ... More on stackoverflow.com
🌐 stackoverflow.com
fish shell suggestions messing up integrated terminal in vs code - Stack Overflow
I see by your screenshot that you are using the oh-my-fish package manager, with what appears to be the default theme. I am also running omf, and I had the issue while the theme was set to default. Switching to another theme resolved the issue and the characters stayed on one line as normal. In my case I switched to the cyan theme - it seems to cooperate with VSCode ... More on stackoverflow.com
🌐 stackoverflow.com
April 21, 2018
🌐
Visual Studio Code
code.visualstudio.com › docs › terminal › shell-integration
Terminal Shell Integration
November 3, 2021 - Run code $__fish_config_dir/config.fish in fish to open the file in VS Code. string match -q "$TERM_PROGRAM" "vscode" and .
🌐
Ngoclb
ngoclb.com › 2024 › 11 › integrate-fish-with-vscode
How to Integrate Fish Shell with Visual Studio Code - ngoclb
November 27, 2024 - Configure VS Code to use Fish as the default shell for the integrated terminal.
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
VSCode Fish
Extension for Visual Studio Code - Fish syntax highlighting and formatting
🌐
GitHub
github.com › kidonng › vscode.fish
GitHub - kidonng/vscode.fish: 🆚🐟 Fish port of Visual Studio Code's Terminal Shell Integration
🆚🐟 Fish port of Visual Studio Code's Terminal Shell Integration - kidonng/vscode.fish
Author   kidonng
Find elsewhere
🌐
GitHub
gist.github.com › rtorr › 233bf6ffd81b6ecdf534
Visual Studio Code fish shell shortcut · GitHub
Visual Studio Code fish shell shortcut. GitHub Gist: instantly share code, notes, and snippets.
🌐
Visual Studio Code
code.visualstudio.com › docs › terminal › profiles
Terminal Profiles
November 3, 2021 - { "terminal.integrated.defaultProfile.osx": "fish", // Use a fully POSIX-compatible shell and avoid running a complex ~/.config/fish/config.fish // for tasks and debug "terminal.integrated.automationProfile.osx": { "path": "/bin/sh" } }
🌐
GitHub
github.com › microsoft › vscode › issues › 151278
Fish shell is not recognized · Issue #151278 · microsoft/vscode
June 5, 2022 - Does this issue occur when all extensions are disabled?: Yes/No VS Code Version: 1.67.2 OS Version: 13.0 Steps to Reproduce: Going into Settings.json adding fish as profile (if its not there) setting: "terminal.integrated.defaultProfile....
Author   iMonZ
🌐
Today I Learned
til.hashrocket.com › posts › gx1ptaddrs-change-vscode-integrated-shell-to-fish-on-mac
Change VSCode Integrated Shell to Fish on Mac - Today I Learned
December 30, 2020 - "terminal.integrated.shell.osx": "/usr/local/bin/fish" Et voila! And a helpful gif: Sources: Changing Shell for Tasks and Debug Tweet · #workflow · permalink ·
🌐
Stack Overflow
stackoverflow.com › questions › 49947435 › fish-shell-suggestions-messing-up-integrated-terminal-in-vs-code
fish shell suggestions messing up integrated terminal in vs code - Stack Overflow
April 21, 2018 - I am not sure why the default theme is not working in VSCode, it seems to do just fine in Cygwin in my experience. ... Sign up to request clarification or add additional context in comments. ... since this method changing shell is deprecated and the recommended way is to use profiles, here's what to add in vsc settings · "terminal.integrated.profiles.windows": { "Fish": { "path": "C:\\Cygwin64\\bin\\bash.exe", "args": ["-lic","fish"] } }, "terminal.integrated.defaultProfile.windows": "Fish"
🌐
YouTube
youtube.com › watch
How to Set Fish as Default Shell in VSCode Terminal on macOS? Getting Path Error! - YouTube
Summary: Learn how to set Fish as the default shell in Visual Studio Code's terminal on macOS and troubleshoot common path errors.---How to Set Fish as Defau...
Published   September 24, 2024
Views   430
🌐
GitHub
github.com › microsoft › vscode › issues › 106409
Integrated terminal not working correctly with fish · Issue #106409 · microsoft/vscode
September 10, 2020 - Issue Type: Bug I've got fish set as my login shell, but VS Code doesn't respect that and defaults /bin/bash bash instead. The documentation makes it seem like all I need to do is set terminal.integrated.shell.osx to /usr/local/bin/fish....
Author   probablykasper
🌐
GitHub
github.com › LaurentFough › fish-vscode › blob › master › README.md
fish-vscode/README.md at master · LaurentFough/fish-vscode
Fish plugin to add support for Visual Studio Code's Terminal Shell Integration. Differences from experimental fish integration in latest VSCode Insiders:
Author   LaurentFough
🌐
Stack Exchange
apple.stackexchange.com › questions › 435021 › vs-code-doesnt-find-fish-if-called-via-automator
terminal - VS Code doesn't find fish if called via Automator - Ask Different
I've using /usr/local/bin/fish as my default shell, which works fine both in Terminal and in the Terminal within VS Code. I was recently trying to add an Automator action to open VS Code from a given file path by using a simple Automator workflow with a "Run Shell Script" action: open -n -b "com.microsoft.VSCode" --args "$*".
🌐
GitHub
github.com › LaurentFough › fish-vscode
GitHub - LaurentFough/fish-vscode: 🆚🐟 Fish port of Visual Studio Code's Terminal Shell Integration
Fish plugin to add support for Visual Studio Code's Terminal Shell Integration. Differences from experimental fish integration in latest VSCode Insiders:
Author   LaurentFough
🌐
GitHub
github.com › bmalehorn › vscode-fish
GitHub - bmalehorn/vscode-fish: Fish syntax highlighting and formatting · GitHub
Add syntax highlighting, linting, code formatting and snippets for the fish shell!
Starred by 79 users
Forked by 8 users
Languages   TypeScript 54.9% | Shell 43.3% | Dockerfile 1.8%