Search code examples
shellterminalvisual-studio-codefish

I installed fish shell on my computer and now I can't open the VS code terminal


I installed fish shell on my computer and now I can't open the VS code terminal.

When I try to open the terminal on VS code, I get the following error: "The terminal process failed to launch: Path to shell executable "/usr/bin/fish" does not exist."

I have no problems with opening the terminal from outside VS code. And when I enter the echo "$SHELL" command on it, I get /usr/bin/fish which is exactly the path VS code isn't able to find.

How could I fix this problem? I'm using ubuntu.


Solution

  • I had this same problem. The issue is that VSC only looks for shells in /usr/bin by default. I copied the default terminal settings and updated fish to where brew installs it: /usr/local/bin

    "terminal.integrated.profiles.osx": {
        "bash": {
            "path": "bash",
            "args": [
                "-l"
            ],
            "icon": "terminal-bash"
        },
        "zsh": {
            "path": "zsh",
            "args": [
                "-l"
            ]
        },
        "fish": {
            "path": "/usr/local/bin/fish", // overriding
            "args": [
                "-l"
            ]
        }
    },
    

    This should be the same for other OSes, you'll just want linux or windows instead of osx.

    fish running in VS Code terminal

    To get to that setting, open up your settings (cmd comma on mac or ctrl comma elsewhere), search for terminal profiles: Settings search and click edit in settings.json. It should take you right to the correct spot to paste in these profiles.