✍️ Working on bash

✍️ Working on bash

[!INFORMATION] Disclaimer: This page is just one opinion. This is not the best way to work on bash scripts, this is just an explanation of how I work.

IDE

I work with VS code on windows + WSL.

Install VS code from here.

VS code extensions

Here is a list of recommended extensions to work on bash scripts:

GitHub Copilot is of great help if you can have it. You can also find the list of extensions here.

VS code settings

You can open your ~/.valet.d directory as a workspace on vscode.

I recommend to copy (or link) the extras/all-valet-functions.sh file present in the Valet installation to ~/.valet.d/.vscode/all-valet-functions.sh in your workspace folder and add the following settings in your ~/.valet.d/.vscode/settings.json:

{
  "bashIde.includeAllWorkspaceSymbols": true
}

This allows you to have autocompletion and help on the core and libraries functions:

autocompletion

Alternatively, you can use the Valet vscode snippets:

  • copy this file in your repository under the .vscode directory (you can chose to ignore this in git or push it).
  • or copy this file as shellscript.json in your user snippets folder (%APPDATA%\Code\User\snippets in windows).
ℹ️
This is done for you if you use the automated installer of Valet.

Where to start your bash journey