docs: Add Shell Script language documentation (#23248)

This commit is contained in:
Peter Tripp
2025-01-16 12:16:38 -05:00
committed by GitHub
parent ffc6b7b102
commit 8e1ad7d475
3 changed files with 82 additions and 7 deletions
+19 -7
View File
@@ -8,17 +8,29 @@ Report issues to: [https://github.com/d1y/bash.zed/issues](https://github.com/d1
## Configuration
The bash-language-server support shellcheck. But you need to install it manually:
When `shellcheck` is available `bash-language-server` will use it internally to provide diagnostics.
### Install `shellcheck`:
```sh
# macOS
brew install shellcheck
brew install shellcheck # macOS (HomeBrew)
apt-get install shellcheck # Ubuntu/Debian
pacman -S shellcheck # ArchLinux
dnf install shellcheck # Fedora
yum install shellcheck # CentOS/RHEL
zypper install shellcheck # openSUSE
choco install shellcheck # Windows (Chocolatey)
```
# Ubuntu/Debian
sudo apt-get install shellcheck
And verify it is available from your path:
# Arch Linux
pacman -S shellcheck
```sh
which shellcheck
shellcheck --version
```
If you wish to customize the warnings/errors reported you just need to create a `.shellcheckrc` file. You can do this in the root of your project or in your home directory (`~/.shellcheckrc`). See: [shellcheck documentation](https://github.com/koalaman/shellcheck/wiki/Ignore#ignoring-one-or-more-types-of-errors-forever) for more.
### See also:
- [Zed Docs: Language Support: Shell Scripts](./sh.md)