How to Run ZSH in Flatpak Code OSS and Visual Studio Code
This blog post describes how to run ZSH in Flatpack Code OSS and Visual Studio Code. The post provides step-by-step instructions for modifying the User or Workspace settings JSON file to use ZSH in the IDE’s terminal. Additionally, the post includes references to sources that provided hints and solutions for the process.
Edit the Settings File
To access settings in Visual Studio Code, use the keyboard shortcut Shift + Cmd + P. Then type “settings” and select “Preferences: Open Settings (JSON)” from the list of options.
Open the User or Workspace settings JSON file and modify it with the following JSON configuration:
"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/usr/bin/flatpak-spawn",
"args": ["--host", "--env=TERM=xterm-256color", "zsh"]
}
}
Restart or, alternatively, open a new terminal session in the IDE.
References
Sources for hints and solutions:
https://github.com/flathub/com.visualstudio.code/issues/44
https://superuser.com/questions/1714960/how-to-use-zsh-in-flatpak-vscode