Use bash instead of Powershell in VS Code terminal

On Windows, selecting the nRF Connect terminal within VS Code seems to start up Powershell. Is there a way to configure it to use bash instead?

I'm currently just launching bash from the toolchain manager, but it would be nice to be able to easily use it from VS Code as well.

Thanks!

Parents Reply
  • I'd like to have the same environment as when I choose "open bash" from the Toolchain Manager of nRF Connect Desktop. Essentially a bash shell with the nRF Connect environment set up.

    I have several build scripts written in bash, but I also just prefer using bash to powershell. Slight smile

    In Linux, selecting the nRF Connect terminal option in VS Code does provide a bash shell with the nRF Connect environment ready to go. I'm hoping to achieve the same thing on Windows.

Children
  • Hi,

    There is some discussion about that in this thread, can you try the suggested solution?

    regards

    Jared

  • Hi Jared,

    Thanks for pointing that out! The comment below the suggested solution says that it won't work on any SDK greater than 2.0.0, and that seems to be the case with 2.4.0 which I am using. Launching git-bash.exe does not set up the Zephyr SDK automatically, so I guess some extra work is involved.

    Also, it doesn't mention anything about setting it up in VS Code.

    The toolchain manager does indeed work for me, but I'm looking to have this work specifically from the "nRF Connect" choice in the VS Code terminal.

    I suppose I could figure out how to add a custom terminal to VS Code, and reverse engineer how the toolchain manager launches it's environment, but that seems like a lot of work. Also, I'd have to add an entry for each toolchain I use (and I use several because I work on many projects), whereas I believe the "nRF Connect" option uses the configured environment.

    If this isn't supported, how can I go about adding a feature request? It would be nice to configure the VS Code "nRF Connect" terminal to use Powershell or bash.

    Thanks again!

  • Hi,

    Let me discuss this with our VS Code developers and see what they suggest,

    I'll be back,

    regards

    Jared

  • Hi,

    Doesn't quite open bash but you're able to run west if you do: In vs code, press Ctrl+Shift+P and select 'nRF Connect: Open Toolchain Terminal Profile.

    I guess you still want to start bash instead of cmd to run your bash scripts?

    Still waiting for reply from our developers,

    regards

    Jared 

  • Thanks for checking!

    Yeah, I'd still like it to start a bash shell so I can easily run the scripts.

    Hopefully the developers can provide a solution.

    In the mean time, I'll stick to a separate bash window from the Toolchain Manager. Slight smile

Related